We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#780
I followed almost everything u said to follow, now took a demo mdp video which is publicly avaliable
The error is: uuid=[e2719d58a985b3c9 781ab030af78d30e] Failed to make drm plugin: 4
uuid=[e2719d58a985b3c9 781ab030af78d30e] Failed to make drm plugin: 4
import android.os.Build import android.view.ViewGroup import android.widget.FrameLayout import androidx.annotation.RequiresApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView import androidx.media3.common.C import androidx.media3.common.MediaItem import androidx.media3.common.MediaMetadata import androidx.media3.common.MimeTypes import androidx.media3.datasource.DefaultHttpDataSource import androidx.media3.exoplayer.ExoPlayer import androidx.media3.exoplayer.dash.DashMediaSource import androidx.media3.exoplayer.dash.DefaultDashChunkSource import androidx.media3.exoplayer.drm.DefaultDrmSessionManager import androidx.media3.exoplayer.drm.FrameworkMediaDrm import androidx.media3.exoplayer.drm.LocalMediaDrmCallback import androidx.media3.exoplayer.trackselection.DefaultTrackSelector import androidx.media3.exoplayer.upstream.DefaultBandwidthMeter import androidx.media3.ui.PlayerView @RequiresApi(Build.VERSION_CODES.Q) @androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class) @Composable fun LiveTV() { val context = LocalContext.current val trackSelector = DefaultTrackSelector(context) val player: ExoPlayer = remember { ExoPlayer.Builder(context).setTrackSelector(trackSelector) .build() .apply { prepare() } } val dashMediaItem = MediaItem.Builder() .setUri("https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/Manifest_1080p_ClearKey.mpd") .setMimeType(MimeTypes.APPLICATION_MPD) .setMediaMetadata(MediaMetadata.Builder().setTitle("Hello").build()) .build() val uA = "Mozilla/5.0 (Linux; Android 11; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Mobile Safari/537.36" val defaultHttpDataSourceFactory = DefaultHttpDataSource.Factory() .setUserAgent(uA) .setTransferListener( DefaultBandwidthMeter.Builder(context) .setResetOnNetworkTypeChange(false) .build() ) val dataSourceFactory = DefaultDashChunkSource.Factory( defaultHttpDataSourceFactory ) val manifestDataSourceFactory = DefaultHttpDataSource.Factory().setUserAgent(uA) val drmCallback = LocalMediaDrmCallback("{\"keys\":[{\"kty\":\"oct\",\"k\":\"nrQFDeRLSAKTLifXUIPiZg\",\"kid\":\"FmY0xnWCPCNaSpRG-tUuTQ\"}],\"type\":\"temporary\"}".toByteArray()) val drmSessionManager = DefaultDrmSessionManager.Builder() .setPlayClearSamplesWithoutKeys(true) .setMultiSession(false) .setKeyRequestParameters(HashMap()) .setUuidAndExoMediaDrmProvider(C.CLEARKEY_UUID, FrameworkMediaDrm.DEFAULT_PROVIDER) .build(drmCallback) val mediaSource = DashMediaSource.Factory(dataSourceFactory, manifestDataSourceFactory) .setDrmSessionManagerProvider { drmSessionManager } .createMediaSource(dashMediaItem) player.setMediaSource(mediaSource, true) player.prepare() Column( modifier = Modifier .fillMaxWidth() .height(260.dp), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { AndroidView( factory = { PlayerView(context).apply { this.player = player player.playWhenReady = true layoutParams = FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) } }, modifier = Modifier .fillMaxSize() .padding(0.dp, 0.dp, 0.dp, 0.dp) .background(Color.Black) ) } }
The text was updated successfully, but these errors were encountered:
Duplicate of #780
Sorry, something went wrong.
icbaker
No branches or pull requests
#780
I followed almost everything u said to follow, now took a demo mdp video which is publicly avaliable
The error is:
uuid=[e2719d58a985b3c9 781ab030af78d30e] Failed to make drm plugin: 4
The text was updated successfully, but these errors were encountered: