Embed: webrtc play promise, webrtc options.setTracks fix
This commit is contained in:
parent
070ba94f50
commit
5c7c2bd801
6 changed files with 126 additions and 36 deletions
|
@ -727,7 +727,7 @@ function MistVideo(streamName,options) {
|
|||
};
|
||||
|
||||
//add track selection function
|
||||
if (!("setTrack" in MistVideo.player.api)) {
|
||||
if (!("setTracks" in MistVideo.player.api)) {
|
||||
MistVideo.player.api.setTracks = function(usetracks){
|
||||
|
||||
//check tracks exist
|
||||
|
@ -782,6 +782,15 @@ function MistVideo(streamName,options) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//add general setTracks function if setTrack exists
|
||||
if (!("setTracks" in MistVideo.player.api) && ("setTrack" in MistVideo.player.api)) {
|
||||
MistVideo.player.api.setTracks = function(usetracks){
|
||||
for (var i in usetracks) {
|
||||
MistVideo.player.api.setTrack(i,usetracks[i]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (options.setTracks) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue