PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 29, 2022

[FIXED] How to detect when user enters and exits airplay in tvOS (tvml/tvjs) app

 September 29, 2022     apple-tv, tvjs, tvml, tvos     No comments   

Issue

What event should I be looking for in order to detect when a user interrupts my app by streaming other airplay content to their apple TV.

The more important of these two from my perspective is to detect when the user exits airplay and my app regains 'focus' - but both enter and exit would be useful.


Solution

just tested and yes, the onResume and onSuspend callback function is called according to the apple docs:

https://developer.apple.com/documentation/tvmljs/app

I don't think you can tell if it was suspended from Airplay or Siri tho. I would imagine you can add gesture recognizers to see what button is pressed and tell if it was from any of the button clicks.



Answered By - kaho
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing