Skip to content

Commit

Permalink
Fixed bugs, upgraded ziggo SDK and added 2 new features included
Browse files Browse the repository at this point in the history
  • Loading branch information
sambua committed May 29, 2020
1 parent b6e77d0 commit 5870c56
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 29 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,17 @@ Add attribute `onRef={ref => (this.child = ref)}` to obtain access to player ins
```

## Adding Localization
`locale={'locale_short_code'}`
`locale={'locale_short_code'}` <br/>
Or you can change any text with your locale:
```jsx
mediaLocales={[
{
register: {"ba-videorecorder-chooser.record-video": "Rec"}, // Any object you want to touch
priority: 10 // Optional could, default is 10.
},
]}
```

[More info about localization](https://ziggeo.com/docs/sdks/javascript/browser-integration/localization)

## Component Options
Expand Down Expand Up @@ -210,6 +220,7 @@ React SDK supports all of the following events and parameters:
- [Application-wide Embedding Events](https://ziggeo.com/docs/sdks/javascript/browser-interaction/application-embedding-events#javascript-revision=stable)

#### Changelog:
- v4.1.0 Upgraded ziggeo-client SDK to `~2.35.18` fixed bugs, added `mediaLocales` prop type to set any locale. New `fittodimensions` & `fullscreenmandatory` features included.
- v4.0.0 Upgraded ziggeo-client SDK to `~2.35.4` fixed bugs, added more new features `multistream` with options drag-and-drop and resize. In player now settings are manageable via methods.
- v3.6.0 Upgraded ziggeo-client SDK to `~2.35.0` fixed bugs, added more new features `multistream` with options drag-and-drop and resize. In player now settings are manageable via methods.
- v3.5.2 Upgraded ziggeo-client SDK to `~2.34.8` fixed bugs.
Expand Down
36 changes: 24 additions & 12 deletions build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-ziggeo",
"version": "4.0.5",
"version": "4.1.0",
"description": "Ziggeo's react component for easy react application deployment",
"main": "build/index",
"scripts": {
Expand Down Expand Up @@ -73,6 +73,6 @@
"style-loader": "^0.13.1",
"url-loader": "^0.5.9",
"webpack": "^2.0.0",
"ziggeo-client-sdk": "^2.35.5"
"ziggeo-client-sdk": "^2.35.18"
}
}
3 changes: 1 addition & 2 deletions src/components/ZiggeoRecorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ const ZiggeoRecorder = ({ app, ...props }) => {
attrs: attributes
}));
}
}, [attributes]);

}, [attributes, recorderElement]);

useEffect(() => {
if (recorder) {
Expand Down
14 changes: 13 additions & 1 deletion src/components/withZiggeoApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ziggeoApplicationEvents, ziggeoRecorderApplicationOptions} from "../cons
import { string } from "prop-types";

const withZiggeoApplication = WrappedComponent => {
return ({apiKey, flashUrl, locale, ...restProps}) => {
return ({apiKey, flashUrl, locale, mediaLocales, ...restProps}) => {

const [app, setApp] = useState(null);

Expand All @@ -26,6 +26,18 @@ const withZiggeoApplication = WrappedComponent => {
if (typeof locale !== "undefined")
ZiggeoApi.V2.Locale.setLocale(locale);

if (mediaLocales) {
if (Array.isArray(mediaLocales))
mediaLocales.map(config => {
const {register} = config;
if (register) {
const priority = config['priority'] || 10;
ZiggeoApi.V2.Locale.mediaLocale.register(register, priority);
}
});
else console.warn('mediaLocales has to be an Array, please read documentation for more details.');
}

// Set external flash player
if (typeof flashUrl !== "undefined")
ZiggeoApi.V2.Config.set("flash", flashUrl);
Expand Down
6 changes: 2 additions & 4 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { string, number, bool, arrayOf, func, array, object, oneOfType } from 'prop-types';

// , , , ,
// , , , , ,
// , ,

// ####################### Player/Recorder Attributes #############################
// When using HTML embed methods, all parameters should be prefixed with ziggeo-
// https://ziggeo.com/docs/sdks/javascript/browser-integration/parameters#javascript-revision=v1-r29&javascript-version=v2
Expand Down Expand Up @@ -91,6 +87,8 @@ export const ziggeoRecorderAttributesPropTypes = {
'addstreampositionheight': number,
'addstreamminwidth': number,
'addstreamminheight': number,
'fullscreenmandatory': bool,
'fittodimensions': bool,

// Data parameters
'tags': arrayOf(string),
Expand Down

0 comments on commit 5870c56

Please sign in to comment.