mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Sending source of video to chromecast
This commit is contained in:
@@ -296,8 +296,8 @@ initializeCastApi = function() {
|
||||
} catch(event){
|
||||
_seekTo = seekTo;
|
||||
}
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase()})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase(), source: videoSource})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source})
|
||||
|
||||
if(Helper.mobilecheck() && !chromecast_specs_sent) {
|
||||
socket.emit("get_id");
|
||||
@@ -325,8 +325,8 @@ initializeCastApi = function() {
|
||||
} catch(event){
|
||||
_seekTo = seekTo;
|
||||
}
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase()})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase(), source: videoSource})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source})
|
||||
hide_native(1);
|
||||
Helper.css("#channel-load", "display", "none");
|
||||
Helper.addClass('.castButton', 'castButton-white-active');
|
||||
|
||||
@@ -382,7 +382,7 @@ var Player = {
|
||||
if(end) e = end;
|
||||
else e = Player.np.end;
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {start: s, end: e, type: "loadVideo", videoId: id, channel: chan.toLowerCase()});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {start: s, end: e, type: "loadVideo", videoId: id, channel: chan.toLowerCase(), source: videoSource});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: 0, title:song_title, image: 'https://img.youtube.com/vi/'+id+'/mqdefault.jpg', images: ['https://img.youtube.com/vi/'+id+'/mqdefault.jpg']});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+id+'/mqdefault.jpg');
|
||||
} else {
|
||||
@@ -498,7 +498,7 @@ var Player = {
|
||||
Player.getTitle(song_title, viewers);
|
||||
//Player.setBGimage(video_id);
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end:end});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end:end, source: videoSource});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: 0, title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg', images: ['https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg']});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
} else {
|
||||
@@ -535,7 +535,7 @@ var Player = {
|
||||
//Player.setBGimage(video_id);
|
||||
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end: end});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", videoId: video_id, channel: chan.toLowerCase(), start: start, end: end, source: videoSource});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: 0, title:song_title, image: 'https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg', images: ['https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg']});
|
||||
chrome.cast.Image('https://img.youtube.com/vi/'+video_id+'/mqdefault.jpg');
|
||||
} else {
|
||||
@@ -547,7 +547,7 @@ var Player = {
|
||||
|
||||
sendNext: function(obj){
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", title: obj.title, videoId: obj.videoId});
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", title: obj.title, videoId: obj.videoId, source: obj.source});
|
||||
}
|
||||
|
||||
if(embed) {
|
||||
|
||||
Reference in New Issue
Block a user