Exemple #1
0
 public LoadRequest(string sessionId, MediaData media, bool autoPlay, double currentTime,
                    object customData = null, int[] activeTrackIds = null)
     : base("LOAD")
 {
     SessionId      = sessionId;
     Media          = media;
     AutoPlay       = autoPlay;
     CurrentTime    = currentTime;
     Customdata     = customData;
     ActiveTrackIds = activeTrackIds;
 }
Exemple #2
0
 public LoadRequest(string sessionId, MediaData media, bool autoPlay, double currentTime,
     object customData = null, int[] activeTrackIds = null)
     : base("LOAD")
 {
     SessionId = sessionId;
     Media = media;
     AutoPlay = autoPlay;
     CurrentTime = currentTime;
     Customdata = customData;
     ActiveTrackIds = activeTrackIds;
 }
Exemple #3
0
        public async Task LoadMedia(
            string mediaUrl,
            string contentType = "application/vnd.ms-sstr+xml",
            IMetadata metadata = null,
            string streamType = "BUFFERED",
            double duration = 0D,
            object customData = null,
            Track[] tracks = null,
            int[] activeTrackIds = null,
            bool autoPlay = true,
            double currentTime = 0.0)
        {
            var mediaObject = new MediaData(mediaUrl, contentType, metadata, streamType, duration, customData, tracks);
            var req = new LoadRequest(Client.CurrentApplicationSessionId, mediaObject, autoPlay, currentTime, customData, activeTrackIds);

            var reqJson = req.ToJson();
            await Write(MessageFactory.Load(Client.CurrentApplicationTransportId, reqJson));
        }