LSP / embed support for appending a string to the video url

This commit is contained in:
cat 2015-11-20 12:04:58 +01:00
parent d8bfe8cebc
commit 63f9fb52a5
3 changed files with 68 additions and 39 deletions

View file

@ -215,16 +215,23 @@ function mistembed(streamname) {
}
var video = mistvideo[streamname],
container = document.createElement('div');
container = document.createElement('div'),
forceType = false,
forceSupportCheck = false,
autoplay = false,
urlappend = false;
if (me.parentNode.hasAttribute('data-forcetype')) {
var forceType = me.parentNode.getAttribute('data-forcetype');
forceType = me.parentNode.getAttribute('data-forcetype');
}
if (me.parentNode.hasAttribute('data-forcesupportcheck')) {
var forceSupportCheck = true;
forceSupportCheck = true;
}
if (me.parentNode.hasAttribute('data-autoplay')) {
var autoplay = true;
autoplay = true;
}
if (me.parentNode.hasAttribute('data-urlappend')) {
urlappend = me.parentNode.getAttribute('data-urlappend');
}
if (video.width == 0) { video.width = 250; }
@ -273,7 +280,12 @@ function mistembed(streamname) {
}
else {
// we support this kind of video, so build it.
buildPlayer(video.source[foundPlayer], container, video.width, video.height, vtype);
var source = video.source[foundPlayer];
if (urlappend) {
source.url += urlappend;
source.relurl += urlappend;
}
buildPlayer(source, container, video.width, video.height, vtype);
}
}