Embed: fix for empty metatracks
This commit is contained in:
parent
421e239bd9
commit
59d5ee2cba
2 changed files with 8 additions and 3 deletions
|
@ -733,6 +733,7 @@ function mistPlay(streamName,options) {
|
|||
};
|
||||
for (var i in streaminfo.meta.tracks) {
|
||||
var t = streaminfo.meta.tracks[i];
|
||||
var skip = false;
|
||||
switch (t.type) {
|
||||
case 'video':
|
||||
t.desc = ['['+t.codec+']',t.width+'x'+t.height,Math.round(t.bps/1024)+'kbps',t.fpks/1e3+'fps',t.lang];
|
||||
|
@ -743,7 +744,11 @@ function mistPlay(streamName,options) {
|
|||
case 'subtitle':
|
||||
t.desc = ['['+t.codec+']',t.lang];
|
||||
break;
|
||||
default:
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
if (skip) { continue; }
|
||||
t.desc = t.desc.join(', ');
|
||||
tracks[t.type].push(t);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<script>
|
||||
// global options can be set here
|
||||
var mistoptions = {
|
||||
host: 'https://cat.mistserver.org:4433'
|
||||
host: 'http://cattop:8080'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -75,10 +75,10 @@
|
|||
c.className = 'mistvideo';
|
||||
c.title = tryplayers[i];
|
||||
document.body.appendChild(c);
|
||||
//mistPlay('live',{
|
||||
mistPlay('live',{
|
||||
//mistPlay('vids+mist.mp4',{
|
||||
//mistPlay('lama',{
|
||||
mistPlay('bunny',{
|
||||
//mistPlay('bunny',{
|
||||
target: c,
|
||||
forcePlayer: tryplayers[i],
|
||||
loop: true
|
||||
|
|
Loading…
Add table
Reference in a new issue