{"version":"1.0","type":"rich","title":"Gist c29e3f734511c0d726414bcb111afe51","description":"This example demonstrates how to play YouTube videos inside an Apple TV app by bridging JavaScript and native Swift code. It shows a custom `YTPlayerViewController` that uses the `AVKit` framework’s `AVPlayerViewController` alongside the `XCDYouTubeKit` library to retrieve video streams. The code integrates with `TVMLKit` by evaluating a JavaScript context, exposing a `playYTblock` function that native code can call. The video player selects from available stream qualities (e.g., HD720, medium360) and automatically dismisses the player when playback ends, using notification observers.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-c29e3f734511c0d726414bcb111afe51?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}