mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Updates
This commit is contained in:
@@ -79,6 +79,7 @@ module.exports = function() {
|
||||
});
|
||||
|
||||
socket.on('chromecast', function(msg) {
|
||||
console.log("chromecast event", msg);
|
||||
try {
|
||||
if(typeof(msg) == "object" && msg.hasOwnProperty("guid") &&
|
||||
msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel") && typeof(msg.guid) == "string" &&
|
||||
@@ -99,6 +100,7 @@ module.exports = function() {
|
||||
coll = coll.substring(0, coll.indexOf("?"));
|
||||
}
|
||||
in_list = true;
|
||||
console.log("chromecast list", coll);
|
||||
chromecast_object = true;
|
||||
socket.join(coll);
|
||||
}
|
||||
@@ -110,6 +112,7 @@ module.exports = function() {
|
||||
});
|
||||
|
||||
socket.on("get_id", function() {
|
||||
console.log("gotten request from mobile", Functions.getSession(socket));
|
||||
socket.emit("id_chromecast", Functions.getSession(socket));
|
||||
});
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ initializeCastApi = function() {
|
||||
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, thumbnail: Player.np.thumbnail})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source, thumbnail: full_playlist[0].thumbnail})
|
||||
|
||||
if(Helper.mobilecheck() && !chromecast_specs_sent) {
|
||||
if(Helper.mobilecheck()) {
|
||||
socket.emit("get_id");
|
||||
}
|
||||
hide_native(1);
|
||||
@@ -322,6 +322,9 @@ initializeCastApi = function() {
|
||||
} catch(event){
|
||||
_seekTo = seekTo;
|
||||
}
|
||||
if(Helper.mobilecheck()) {
|
||||
socket.emit("get_id");
|
||||
}
|
||||
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, thumbnail: Player.np.thumbnail})
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source, thumbnail: full_playlist[0].thumbnail})
|
||||
hide_native(1);
|
||||
|
||||
Reference in New Issue
Block a user