Beispiel #1
0
        public void pause(bool pausePlayback, double position)
        {
            IConnection connection = FluorineContext.Current.Connection;

            if (!(connection is IStreamCapableConnection))
            {
                return;
            }
            IStreamCapableConnection streamConnection = connection as IStreamCapableConnection;
            int           streamId = GetCurrentStreamId();
            IClientStream stream   = streamConnection.GetStreamById(streamId);

            if (stream == null || !(stream is ISubscriberStream))
            {
                return;
            }
            ISubscriberStream subscriberStream = stream as ISubscriberStream;

            if (pausePlayback)
            {
                subscriberStream.Pause((int)position);
            }
            else
            {
                subscriberStream.Resume((int)position);
            }
        }
Beispiel #2
0
        public void pause(bool pausePlayback, double position)
        {
            IConnection connection = FluorineContext.Current.Connection;

            if (connection is IStreamCapableConnection)
            {
                IStreamCapableConnection connection2 = connection as IStreamCapableConnection;
                int           currentStreamId        = this.GetCurrentStreamId();
                IClientStream streamById             = connection2.GetStreamById(currentStreamId);
                if ((streamById != null) && (streamById is ISubscriberStream))
                {
                    ISubscriberStream stream2 = streamById as ISubscriberStream;
                    if (pausePlayback)
                    {
                        stream2.Pause((int)position);
                    }
                    else
                    {
                        stream2.Resume((int)position);
                    }
                }
            }
        }