Open TDUser91 opened 1 year ago
@TDUser91 you can go with this way
import React, { useRef, useEffect } from 'react'
import ShakaPlayer from 'shaka-player-react'
import 'shaka-player/dist/controls.css'
const Player = () => {
const shakaRef = useRef(null)
const drmLicenseUrl = 'https://cwip-shaka-proxy.appspot.com/no_auth'
const { player, ui, videoElement } = shakaRef?.current
useEffect(()=>{
if (drmLicenseUrl !== '') {
player?.configure({
drm: {
servers: {
'com.widevine.alpha': drmLicenseUrl,
},
},
})
}
},[)
return(
<ShakaPlayer
autoPlay
ref={shakaRef}
src={'https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd'}
/>)
}
export default Player;
how do I play drm streaming content using this library ? Thank you
example dataSource: