Shaka Player にライブ ストリーミングを実装しようとしています。通常Hls.js
は正常に動作していますが、表示されている Shaka Player で実装できないようですerror code 4030
。
Reactの純粋なHls:
const video = document.getElementById('video-main')
const streamSourceUrl = 'https://cdn-mxs-01.akamaized.net/Content/HLS/Live/channel(02d97239-cf8c-abac-8549-afd56a0b3924)/index_L2.m3u8?hdnts=st=1590987868~exp=1590991468~acl=/*~hmac=611ab22b64269b296e4c1a3572b91f5d011805c2e69339bb216a2d273d2f561f&ticket=IucGX1FZuEF3w4YBUIn8MYsdhdoBafV-Baox-nIrViUqI3cpJh4KE7O-lW6TD4oWrxBjmEkTgmLYGyGO5vqKY-cfI1w00trRkVy5Ea30Snb_0emE7s5hycyjg1lDdCTXmIBpKMjXgy1vLQC_Y9u6eG4yUEh8EO-NcEqq6LpDZKMobVVxE-NQz2r2VTH9J5DqFfxcG5_6PaZbAUqRRB6A6XjCCsLH4aK7ET1ce7RmqDlrf1EEYOoUzuHBgTvGa2scw_Rg9_8='
if (Hls.isSupported()) {
let hls = new Hls()
hls.loadSource(streamSourceUrl)
hls.attachMedia(video)
hls.on(Hls.Events.MANIFEST_PARSED, function() {
video.play()
that.setState({
isPlaying: true,
isError: false,
})
})
}
React の Shaka Player は、私の同様のshaka デモmux.js
にインポートされましたindex.html
const streamSourceUrl = 'https://cdn-mxs-01.akamaized.net/Content/HLS/Live/channel(02d97239-cf8c-abac-8549-afd56a0b3924)/index_L2.m3u8?hdnts=st=1590987868~exp=1590991468~acl=/*~hmac=611ab22b64269b296e4c1a3572b91f5d011805c2e69339bb216a2d273d2f561f&ticket=IucGX1FZuEF3w4YBUIn8MYsdhdoBafV-Baox-nIrViUqI3cpJh4KE7O-lW6TD4oWrxBjmEkTgmLYGyGO5vqKY-cfI1w00trRkVy5Ea30Snb_0emE7s5hycyjg1lDdCTXmIBpKMjXgy1vLQC_Y9u6eG4yUEh8EO-NcEqq6LpDZKMobVVxE-NQz2r2VTH9J5DqFfxcG5_6PaZbAUqRRB6A6XjCCsLH4aK7ET1ce7RmqDlrf1EEYOoUzuHBgTvGa2scw_Rg9_8='
const video = document.getElementById('video-main')
const player = new shaka.Player(video)
player
.load(streamSourceUrl, 0)
.then(() => {
// I am expecting the stream to load like Hls code above
})
エラーログ: