pub fn watch(&self) -> impl Future<Output = Result<(), failure::Error>> {
        // MediaSession Service Setup
        // Set up the MediaSession Discovery service. Connect to the session watcher.
        let discovery = connect_to_service::<DiscoveryMarker>()
            .expect("Couldn't connect to discovery service.");
        let (watcher_client, watcher_requests) =
            create_request_stream().expect("Error creating watcher request stream");

        // Only subscribe to updates from players that are active.
        let watch_active_options =
            WatchOptions { only_active: Some(true), ..WatchOptions::new_empty() };
        discovery
            .watch_sessions(watch_active_options, watcher_client)
            .expect("Should watch media sessions");
        // End MediaSession Service Setup

        let inner = self.inner.clone();

        Self::watch_media_sessions(discovery, watcher_requests, inner)
    }
// Returns a future that watches MediaPlayer for updates.
Returns a future that watches MediaPlayer for updates.
Returns a future that watches MediaPlayer for updates .
pub fn watch(&self) -> impl Future<Output = Result<(), failure::Error>> {
        // MediaSession Service Setup
        // Set up the MediaSession Discovery service. Connect to the session watcher.
        let discovery = connect_to_service::<DiscoveryMarker>()
            .expect("Couldn't connect to discovery service.");
        let (watcher_client, watcher_requests) =
            create_request_stream().expect("Error creating watcher request stream");
        // Only subscribe to updates from players that are active.
        let watch_active_options =
            WatchOptions { only_active: Some(true), ..WatchOptions::new_empty() };
        discovery
            .watch_sessions(watch_active_options, watcher_client)
            .expect("Should watch media sessions");
        // End MediaSession Service Setup
        let inner = self.inner.clone();
        Self::watch_media_sessions(discovery, watcher_requests, inner)
    }
pub fn watch ( & self ) -> impl Future < Output = Result < ( ) , failure :: Error > > { // MediaSession Service Setup // Set up the MediaSession Discovery service. Connect to the session watcher. let discovery = connect_to_service :: < DiscoveryMarker > ( ) . expect ( " " ) ; let ( watcher_client , watcher_requests ) = create_request_stream ( ) . expect ( " " ) ; // Only subscribe to updates from players that are active. let watch_active_options = WatchOptions { only_active : Some ( true ) , .. WatchOptions :: new_empty ( ) } ; discovery . watch_sessions ( watch_active_options , watcher_client ) . expect ( " " ) ; // End MediaSession Service Setup let inner = self . inner . clone ( ) ; Self :: watch_media_sessions ( discovery , watcher_requests , inner ) }
Returns a future that watches MediaPlayer for updates.
Returns a future that watches MediaPlayer for updates .
&self