Open Rainnwind opened 7 years ago
Have you tried subscribing to status updates or calling getStatus ?
Below is what I've tried with a subscription on status but it only fires when media status changes from IDLE to BUFFERED etc - is this expected behavior?
getStatus on the other hand works like a charm and I'll be using that for now :)
function castVideo(host: string, video: { source: string; type: string; }) {
var client = new Client();
var interval;
client.connect(host, function () {
client.launch(DefaultMediaReceiver, function (err, player) {
var media = {
contentId: video.source,
contentType: video.type,
streamType: 'BUFFERED',
metadata: {
type: 0,
metadataType: 0,
title: "..."
}
};
player.on("status", function (status) {
console.log(status);
});
player.load(media, { autoplay: true }, function (err, status) {
...
});
});
});
Hi.
I'm trying to keep track of the position of the played media on the chrome cast but I can't seem to find the proper event to listen on and alternatively I can't see to find a way to extract the position of the media.
Help needed :)