Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up👀 MediaSource Stream Possible? #1761
Comments
This comment has been minimized.
This comment has been minimized.
|
did chromecast remove service worker?! that's a bummer! any references to chromecast changelog or something like that? |
This comment has been minimized.
This comment has been minimized.
|
I tried to look for any changelog or more information on the service worker matter but without luck. With browsercast not working, I'm trying to extend my own sender library ChromecastJS with an extra feature to stream local or webtorrent files to my custom chromecast receiver. // sender
media = torrent.files.find(function (file) {
return file.name.endsWith('.mp4')
})
media.renderTo('#video', (err, elem) => {
stream = elem.captureStream(24)
peer.call(peerreceiver, stream);
}) // chromecast receiver
peer.on('call', function(call) {
call.answer();
call.on('stream', (stream) => {
document.getElementById('video').srcObject = stream
document.getElementById('video').play()
})
});However, using a direct mp4 link works fine, but using the webtorrent file stream does not transfer the audio correctly to the receiver ( messed up audio ). If you got any ideas, feel free to help . edit edit 2 https://giphy.com/gifs/VcBlGiJ08eyH5Iv4KR I managed to cast a torrent media file from the browser without any extentions. I think captureStream is not the way to go if we cannot fix the framerate issue. I'm now trying to use the MediaSource API to construct the chunks directly from the createReadStream |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
should file a bug report |
This comment has been minimized.
This comment has been minimized.
|
My bad, serviceWorker is still in the navigator object but your app needs to run in a "secure context" ( localhost or https ) google/shaka-player#2205 (comment) The chromecast still crashes when registering a serviceworker ( even if it's empty ) while the same code works on any browser. I think this is an underlying C++ bug in the latest chromecast firmware |


Hi all,
Chromecast removed service workers in their latest updates and we cannot use BrowserCast anymore to cast torrent media ( from the browser )
The last hope is the "Media Source Extensions" ( MSE ) but this seems complicated and I couldn't figure out how to make it work with webtorrent.
Is it possible to use webtorrent to create an MediaSource mse-demo?
I would like to hear your thoughts, Fenny
Reference 897