What causes 'A valid type has not been set for this stream or a stream that it dependes on' exception during video playback

0

We do use MediaPlayerElement in UWP to play videos. However, occasionally (the occurance seems to be rare), the video which is working normally in any other way fails with following exception:

A valid type has not been set for this stream or a stream that it dependes on. (Exception from HRESULT 
0xC00D6D60)

What can cause this exception in our case? How to prevent it?

Edit - added snippet according to RoyLi comment:

This is how we create MediaPlaybackItem.

                StorageFile manifest_file = await Storage.MovieManifestFile(mi.UserGUID, mi.OrderItemGUID);

                amscr = await AdaptiveMediaSource.CreateFromStreamAsync(await manifest_file.OpenReadAsync(), new Uri(mi.MPDManifestUrl), "application/dash+xml");

                MediaSource converted_amscr = MediaSource.CreateFromAdaptiveMediaSource(amscr.MediaSource);

                MediaPlaybackItem ampi = new MediaPlaybackItem(converted_amscr);

The video source is MPEG-DASH stream protected with PlayReady. The issue was reproduced only on some devices and it happened not just for MPEG-DASH, but also for PIFF files.

After creating the MediaPlaybackItem, we simply use it as source for MediaPlayerElement.

 me.MediaPlayer.Source = ampi;
 me.MediaPlayer.Play();
c#
uwp
asked on Stack Overflow Feb 12, 2021 by panpernicek • edited Feb 16, 2021 by panpernicek

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0