tvos 10 player stop without event

Hey,


I'm playing a video stream using this code:


var player = new Player();
var playlist = new Playlist();
var mediaItem = new MediaItem("video", myVideo.videoUrl);

player.addEventListener("stateDidChange", handlePlayerStateChanged.bind(this));
player.addEventListener("playbackError", handlePlayerError.bind(this));

player.playlist = playlist;
player.playlist.push(mediaItem);

player.present();


For some reason on my TVML app which is compiled using tvOS 10 and runs on the last AppleTV build 14T330, the video stops suddently and closes. Also no event is reported to my listeners about this. I verified the stream is ok, beacause it plays well using QuickTime.


Did anyone encounter this issue? Any idea why it happens?


In the device console the last message just before the video stops are:


Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Buffered time range did change], initiating event processing
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Buffered time range did change] in state [Showing video view]
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Showing video view] on event [Buffered time range did change]
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Buffered time range did change], initiating event processing
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Buffered time range did change] in state [Showing video view]
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Showing video view] on event [Buffered time range did change]
Oct  9 11:35:58 Apple-TV com.apple.accessibility.AccessibilityUIServer(AccessibilityUtilities)[145] <Notice>: Error: Could not find server for service: com.apple.accessibility.AXPineBoardServer
Oct  9 11:35:58 Apple-TV com.apple.accessibility.AccessibilityUIServer(AccessibilityUtilities)[145] <Error>: AX SpringBoardServer: Error: Domain:IPC Code:0 Reason:The operation couldn\M-b\M^@\M^Yt be completed. Could not find server for service: com.apple.accessibility.AXPineBoardServer
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Buffered time range did change], initiating event processing
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Buffered time range did change] in state [Showing video view]
Oct  9 11:35:58 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Showing video view] on event [Buffered time range did change]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Stop], initiating event processing
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Stop] in state [Playing]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Setting AVPlayer rate to 0.000000
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3951: sid:0x18b1f, App1(165), 'prim', playerref=0x1010a3200, modes=Output(2), state=Paused
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3997: 0 running inputs, 1 running outputs, 0 running processors, 0 active nodes
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: AVPlayer rate did change to 0.000000
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Setting state to <private>
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Error>: **** RTC is not configured. Not sending metrics for event sessionSummary. ****
Oct  9 11:35:59 Apple-TV mediaserverd(RTCReporting)[24] <Info>: sendMessageToClient: 106, 0
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Clean up], initiating event processing
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Clean up] in state [Ready for playback]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] transitioning from state [Ready for playback] to [Cleaned up]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Info>: State did change to Cleaned up.  error property is (null), AVAsset property is (null)
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Cancelling any outstanding unexpected Pause events
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] transitioning from state [Playing] to [Stopped]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Player state did change], initiating event processing
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Player state did change] in state [Showing video view]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Showing video view] on event [Player state did change]
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3951: sid:0x18b1f, App1(165), 'prim', playerref=0x101089e00, modes=Output(2), state=Stopped
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3997: 0 running inputs, 1 running outputs, 0 running processors, 0 active nodes
Oct  9 11:35:59 Apple-TV mediaserverd(VirtualAudio)[24] <Info>: 228: Client request to get virtual format ([ 32/48000/2; flags: 0x9; bpp: 8; fpp: 1; Bpf: 8 ]) on virtual audio stream 108.
Oct  9 11:35:59 Apple-TV mediaserverd(VirtualAudio)[24] <Info>: 228: Client request to get virtual format ([ 32/48000/2; flags: 0x9; bpp: 8; fpp: 1; Bpf: 8 ]) on virtual audio stream 108.
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Stop] in state [Stopped]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Cancelling any outstanding unexpected Pause events
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Stopped] on event [Stop]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Continue loading current item] in state [Stopped]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine named [<private>] processed unhandled event [Continue loading current item]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Stopped] on event [Continue loading current item]
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dbc40) subType = 'aac ', inputFormat = 0x16f538ad8, outputFormat = 0x106aa57d0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:352:Initialize: (0x1010dbc40) Input format:  1 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:355:Initialize: (0x1010dbc40) Output format:  1 ch,  48000 Hz, Float32
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dee40) subType = 'aac ', inputFormat = 0x16f538a28, outputFormat = 0x106aa6b90, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:352:Initialize: (0x1010dee40) Input format:  1 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:355:Initialize: (0x1010dee40) Output format:  1 ch,  48000 Hz, Float32
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dee40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dee40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dee40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x106aa84d0, inMagicCookieByteSize = 39
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dee40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Info>: 2967: aq@0x1010db400: RealClientSession 0x18b1f
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Info>: 2992: aq@0x1010db400: RealClientPIDForInterruptionPurposes 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x16f538ad8, outputFormat = 0x106aa70a0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:352:Initialize: (0x1010dda40) Input format:  1 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:355:Initialize: (0x1010dda40) Output format:  1 ch,  48000 Hz, Float32
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x16f538a28, outputFormat = 0x106aa8190, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:352:Initialize: (0x1010dda40) Input format:  1 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Notice>: ACMP4AACBaseDecoder.cpp:355:Initialize: (0x1010dda40) Output format:  1 ch,  48000 Hz, Float32
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x106aa94c0, inMagicCookieByteSize = 39
Oct  9 11:35:59 Apple-TV mediaserverd(AudioCodecs)[24] <Info>: ACMP4AACBaseDecoder.cpp:350:Initialize: (0x1010dda40) subType = 'aac ', inputFormat = 0x0, outputFormat = 0x0, inMagicCookie = 0x0, inMagicCookieByteSize = 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Info>: 2967: aq@0x1010d9c00: RealClientSession 0x18b1f
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Info>: 2992: aq@0x1010d9c00: RealClientPIDForInterruptionPurposes 0
Oct  9 11:35:59 Apple-TV mediaserverd(CFNetwork)[24] <Notice>: TIC TCP Conn Cancel [57:0x10505bc40]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [57 aa.pmd.bb.com:80 ready resolver (satisfied)]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [57.1 212.25.69.154:80 ready socket-flow (satisfied)]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_flow_protocol_disconnected [57.1 212.25.69.154:80 cancelled socket-flow (null)] Output protocol disconnected
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [57.2 212.25.69.152:80 initial path (null)]
Oct  9 11:35:59 Apple-TV mediaserverd(VirtualAudio)[24] <Info>: 228: Client request to get virtual format ([ 32/48000/2; flags: 0x9; bpp: 8; fpp: 1; Bpf: 8 ]) on virtual audio stream 108.
Oct  9 11:35:59 Apple-TV mediaserverd(VirtualAudio)[24] <Info>: 228: Client request to get virtual format ([ 32/48000/2; flags: 0x9; bpp: 8; fpp: 1; Bpf: 8 ]) on virtual audio stream 108.
Oct  9 11:35:59 Apple-TV mediaserverd(CFNetwork)[24] <Notice>: TIC TCP Conn Cancel [58:0x106a45cf0]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [58 235157aa.pmd.bb.com:80 ready resolver (satisfied)]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [58.1 212.25.69.154:80 ready socket-flow (satisfied)]
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_flow_protocol_disconnected [58.1 212.25.69.154:80 cancelled socket-flow (null)] Output protocol disconnected
Oct  9 11:35:59 Apple-TV mediaserverd(libsystem_network.dylib)[24] <Info>: nw_endpoint_handler_cancel [58.2 212.25.69.152:80 initial path (null)]
Oct  9 11:35:59 Apple-TV mediaserverd(CFNetwork)[24] <Error>: NSURLSessionTask finished with error - code: -999
Oct  9 11:35:59 Apple-TV mediaserverd(CFNetwork)[24] <Notice>: TIC TCP Conn Destroyed [58:0x106a45cf0]
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 350: AQME device AQDefaultDevice: client stopping: <AudioQueueObject@0x1010a3200; Unknown figplayer; sid:0x18b1f, App1(165), 'prim'; play>; running count now 0
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3951: sid:0x18b1f, App1(165), 'prim', playerref=0x1010a3200, modes=Output(2), state=Stopped
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3997: 0 running inputs, 0 running outputs, 0 running processors, 0 active nodes
Oct  9 11:35:59 Apple-TV mediaserverd(CoreMedia)[24] <Notice>: -CMSessionMgr- CMSession: 'sid:0x18b1f, App1(165), 'prim'' with category/mode SoloAmbientSound/Default stopping playing
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3951: sid:0x18b1f, App1(165), 'prim', playerref=0x1010a3200, modes=Output(2), state=Stopped
Oct  9 11:35:59 Apple-TV mediaserverd(AudioToolbox)[24] <Notice>: 3997: 0 running inputs, 0 running outputs, 0 running processors, 0 active nodes
Oct  9 11:35:59 Apple-TV mediaremoted[28] <Notice>: Setting 0 supported commands for <private>
Oct  9 11:35:59 Apple-TV mediaremoted(MediaRemote)[28] <Notice>: Suppressing <private> -- client process did not ask to receive these notifications.
Oct  9 11:35:59 Apple-TV assistantd(MediaRemote)[26] <Notice>: Suppressing <private> -- client process did not ask to receive these notifications.
Oct  9 11:35:59 Apple-TV App1(MediaRemote)[165] <Notice>: Suppressing <private> -- client process did not ask to receive these notifications.
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: <private> invalidated
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] received event [Set playlist], initiating event processing
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] processing event [Set playlist] in state [Stopped]
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Playlist's initial current media item: (null)
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: Playlist's initial next media item: (null)
Oct  9 11:35:59 Apple-TV App1(TVServices)[165] <Notice>: State machine [<private>] remaining at state [Stopped] on event [Set playlist]
Oct  9 11:35:59 Apple-TV tvcontrold(MediaRemote)[48] <Notice>: Received Media Remote client notification <private>
Oct  9 11:35:59 Apple-TV PineBoard(MediaRemote)[44] <Notice>: Suppressing <private> -- client process did not ask to receive these notifications.
Oct  9 11:35:59 Apple-TV TVAirPlay(MediaRemote)[120] <Notice>: Suppressing <private> -- client process did not ask to receive these notifications.
Oct  9 11:35:59 Apple-TV mediaserverd(CoreMedia)[24] <Notice>: -CMSessionMgr- CMSession: 'FigPlayer - 165' com.app.App1(pid = 165) requesting to set the discovery mode to DiscoveryMode_None
Oct  9 11:35:59 Apple-TV mediaserverd(CoreMedia)[24] <Notice>: -CMRoutingMgr- CMSession: Session requesting to set the discovery mode to DiscoveryMode_None
Oct  9 11:35:59 Apple-TV mediaserverd(RTCReporting)[24] <Info>: sendMessageToClient: 105, 0
Oct  9 11:35:59 Apple-TV mediaremoted[28] <Notice>: Now playing application is playing did change to 0
Oct  9 11:35:59 Apple-TV PineBoard(BackBoardServices)[44] <Info>: Resetting user event timer to Disabled duration 0
Oct  9 11:35:59 Apple-TV PineBoard(BackBoardServices)[44] <Info>: Resetting user event timer to IdleRetroactively duration 50
Oct  9 11:35:59 Apple-TV PineBoard(BackBoardServices)[44] <Info>: Resetting user event timer to Disabled duration 0
Oct  9 11:35:59 Apple-TV PineBoard(BackBoardServices)[44] <Info>: Resetting user event timer to IdleRetroactively duration 30

Accepted Reply

This has been fixed in latest developer seeds. As a workaround, hold on to a reference to your player while you are playing content and you are free to remove that reference once you are done with it.

Replies

This has been fixed in latest developer seeds. As a workaround, hold on to a reference to your player while you are playing content and you are free to remove that reference once you are done with it.

Hey s.borkin,

Are you able to resolve the issue, please suggest what you did?


Thanks,