Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into add-xapi-video-verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
figureone committed May 25, 2018
2 parents 26b8f94 + 229fcd8 commit 17052be
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
26 changes: 13 additions & 13 deletions language/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
{
"label":"Playback",
"label":"تشغيل",
"fields":[
{
"label":"التشغيل التلقائي الفيديو",
Expand Down Expand Up @@ -92,47 +92,47 @@
]
},
{
"label":"Accessibility",
"label":"إمكانية الوصول",
"fields":[
{
"label":"Add video track",
"label":"إضافة مسار الفيديو",
"entity":"Track",
"field":{
"label":"Track",
"fields":[
{
"label":"Track label"
"label":"تتبع المسار"
},
{
"label":"Type kind, refer to <a href=https://html.spec.whatwg.org/multipage/embedded-content.html#the-track-element>HTML living standard</a>",
"default":"descriptions",
"label":"اكتب النوع، ارجع إلى <a href=https://html.spec.whatwg.org/multipage/embedded-content.html#the-track-element>HTML living standard</a>",
"default":"الوصف",
"options":[
{
"label":"Subtitles"
"label":"عناوين فرعية"
},
{
"label":"Captions"
"label":"التسميات التوضيحية"
},
{
"label":"Descriptions"
"label":"الوصف"
},
{
"label":"Chapters"
"label":"فصول"
}
]
},
{
"label":"Track file (WebVTT)",
"label":"تتبع الملف (WebVTT)",
"default":"en",
"description":"Must be a valid BCP 47 language tag. If the kind attribute is set to subtitles, then srclang must be defined."
},
{
"label":"Track file (WebVTT)"
"label":"تتبع الملف (WebVTT)"
}
]
}
}
]
}
]
}
}
6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"license": "MIT",
"author": "Joubel",
"majorVersion": 1,
"minorVersion": 3,
"patchVersion": 10,
"minorVersion": 4,
"patchVersion": 1,
"runnable": 0,
"coreApi": {
"majorVersion": 1,
Expand Down Expand Up @@ -42,4 +42,4 @@
"minorVersion": 0
}
]
}
}
15 changes: 15 additions & 0 deletions scripts/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ H5P.Video = (function ($, ContentCopyrights, MediaCopyright, handlers) {
self.mousedown = false;
});

// Reference to the handler
var handlerName = '';

// Initialize event inheritance
H5P.EventDispatcher.call(self);

Expand Down Expand Up @@ -139,6 +142,16 @@ H5P.Video = (function ($, ContentCopyrights, MediaCopyright, handlers) {
return info;
};

/**
* Get name of the video handler
*
* @public
* @returns {string}
*/
self.getHandlerName = function() {
return handlerName;
};

// Resize the video when we know its aspect ratio
self.on('loaded', function () {
self.trigger('resize');
Expand Down Expand Up @@ -189,11 +202,13 @@ H5P.Video = (function ($, ContentCopyrights, MediaCopyright, handlers) {
tracks: tracks,
disableRemotePlayback: (parameters.visuals.disableRemotePlayback || false)
}, parameters.l10n);
handlerName = handler.name;
return;
}

if (handler === H5P.VideoHtml5) {
html5Handler = handler;
handlerName = handler.name;
}
}

Expand Down

0 comments on commit 17052be

Please sign in to comment.