In Safari 12.1 (13607.1.40.1.5), window.MediaSource is the constructor for MediaSource.
In Safari TP Release 79 (Safari 12.2, WebKit 13608.1.14), window.MediaSource is undefined.
In the latest WebKit nightly (r244287), my test page is in a reload loop of some kind, so I don't know the state of this in the latest WebKit.
Joey, any chance you've enabled the Debug menu in STP and checked the "Disable Media Source Extensions" menu in Debug -> Media Flags?
I've got the "Develop" menu, if that's what you mean. I don't see anything labeled "Debug". In the dev menu, "Experimental Features" has nothing about MSE, and I clicked "Reset All to Defaults" for good measure. None of the "Disable" items are checked, and I don't see MediaSource in there anyway.
What's really strange is that window.SourceBuffer _is_ there, as is window.MediaCapabilities. If I create a video element, it reports that it can't play either MP4 or HLS. So something seems fundamentally weird and wrong.
Am I missing something obvious or doing something dumb?
Okay, I found an article about enabling the "Debug" menu, figured out how to apply it to Tech Preview (probably obvious to others, but news to me).
It turns out that those flags are indeed checked, but I never checked them. In fact, I never had this menu enabled before now. Could it be that these settings used to live elsewhere and were checked in an old version, then got moved to the secret Debug menu without clearing their non-default values?
Okay, so clearly no bug on MSE, but I'm not sure how I ended up with those settings without ever having seen or enabled the menu. Migration problem?
Anyway, thanks for the hint, Jer, and I'm sorry if this has been a waste of your time.
Yeah that's definitely weird. If this ever happens again, it would be nice to see your ~/Library/Preferences/com.apple.SafariTechnologyPreview.plist file, and see if we can figure out where preference migration went wrong.
It would also be nice to hear how STP 79 was installed; an upgrade from 78? Or a fresh install? (This could affect how preferences were migrated.)
It was an upgrade, but I don't know what version I had before. I'm in the habit of installing updates, but my Mac had been turned off for some months. So it may or may not have been an upgrade from 78, specifically, but it was definitely an upgrade.
I'm sorry I didn't take the time to wait for instructions. It must be too late now to capture my preferences file for you.