Started on source swap
This commit is contained in:
parent
c202cc1ffb
commit
dcd9ca3a93
2
dist/plyr.js
vendored
2
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -1584,6 +1584,17 @@
|
|||||||
// Update source
|
// Update source
|
||||||
// Sources are not checked for support so be careful
|
// Sources are not checked for support so be careful
|
||||||
function _parseSource(sources) {
|
function _parseSource(sources) {
|
||||||
|
// YouTube
|
||||||
|
if(player.type === "youtube" && typeof sources === "string") {
|
||||||
|
if(sources.indexOf("http") === 0) {
|
||||||
|
player.embed.loadVideoByUrl(sources);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.embed.loadVideoById(sources);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Pause playback (webkit freaks out)
|
// Pause playback (webkit freaks out)
|
||||||
_pause();
|
_pause();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user