bvibber / ogv.js

JavaScript media player using Ogg/Vorbis/Theora/Opus/WebM libs compiled with Emscripten
https://brooke.vibber.net/misc/ogv.js/demo/
Other
1.2k stars 101 forks source link

Audio only version? #322

Open mathwhiz1212 opened 8 years ago

mathwhiz1212 commented 8 years ago

Do you have an audio only version? I only need to be able to play mono ogg vorbis audio (preferably mono opus audio as well.) and I don't want to have to load the whole thing with video support, but I can if I have to. I can't find anything that says if you have an audio version or not. although these issues: https://github.com/brion/ogv.js/issues/55 https://github.com/brion/ogv.js/issues/127 seem to indicate you are at least working on it.

bvibber commented 8 years ago

I believe the OGVPlayer instance will still work if you keep it hidden or don't add it to the DOM, though it will still internally create a canvas that isn't used. Give it a try and let me know if it doesn't work!

Note that the Theora and VP8 video decoders are separate modules and only loaded on demand, so you can also simply delete them to save a little on space if needed.

Could be further optimized for payload size with some tweaks to the build scripts to drop the YUV output code, if that's useful to folks, but I'm not sure how much it'd save.

mathwhiz1212 commented 8 years ago

Would deleting the Theora and VP8 decoders cause any errors?

bvibber commented 8 years ago

Only if you manage to feed in a file that would have used them. :)

mathwhiz1212 commented 8 years ago

Ok, Thanks! I can't try it right now but I'll tell you what happens.

mathwhiz1212 commented 8 years ago

Could you please give me the basics of what I need to do?

mathwhiz1212 commented 8 years ago

If you could give me the files for the demo you did: https://brionv.com/misc/ogv.js/demo/ I think I could figure it out. Thanks!

mathwhiz1212 commented 8 years ago

If you could just tell me the scripts to include that would be great. Thanks!

mathwhiz1212 commented 8 years ago

I'm trying to replicate your demo but all I get is a fancy looking player that decodes natively.

mathwhiz1212 commented 8 years ago

I think I have all the needed scripts but I might not have them in the right order or something.

daslicht commented 8 years ago

Is there somewhere an example how to play an ogg stream which comes from icecast ? Or just an stereo audio ogg ?

And where we are at it ;) is it possible to access embedded vorbis comments ?