I am trying to create 'var mediaSource = new MediaSource();' but I get 'ReferenceError: MediaSource is not defined' It worked a few days ago, what happened?
I am trying to create a MediaSource object by 'var mediaSource = new MediaSource();' but I get 'ReferenceError: MediaSource is not defined'. This method worked for the site I was developing a few days ago but keeps throwing this error. How would I go about correcting this?
被采纳的解决方案
What is the value of media.mediasource.enabled ?
You can also try:
var mediaSource = new MediaSource;
See:
[1] Available after switching the about:config preference media.mediasource.enabled to true.定位到答案原位置 👍 0
所有回复 (3)
选择的解决方案
What is the value of media.mediasource.enabled ?
You can also try:
var mediaSource = new MediaSource;
See:
[1] Available after switching the about:config preference media.mediasource.enabled to true.
由cor-el于
cor-el said
What is the value of media.mediasource.enabled ? You can also try: var mediaSource = new MediaSource; See:[1] Available after switching the about:config preference media.mediasource.enabled to true.
Thank you for your reply, I just figured out it was the media.mediasource.whitelist value being set to true. It is now set to false and everything is working as it should. I am not sure why my settings would have changed, maybe the recent update?
Thank you again.
Currently, the whitelist is restricted to certain youtube and netflix domains. I'm not sure how others sites can effectively use MediaSource extensions in this situation.