Deliver a great playback experience on tvOS

RSS for tag

Discuss the WWDC21 session Deliver a great playback experience on tvOS.

View Session

Posts under wwdc21-10191 tag

5 Posts
Sort by:
Post not yet marked as solved
0 Replies
425 Views
Hello everyone, I'm trying to add one or more Custom info view controllers in my tvOS player. I created a new UIViewController class, I connected it to my Storyboard scene, in which inside is present a Collection view. Inside the native player I'm calling: playerController.customInfoViewControllers = [LocalChannelListController()] Inside the player I can see now the new tab with the title that I assigned in my LocalChannelListController, but the content is empty. Is there something else that I need to do in order to display the content of that controller? [EDIT] Looks like I can't use Storyboard in order to create my custom UIKit interface. So creating programmatically the content with collection view, it will work properly.
Posted
by
Post marked as solved
1 Replies
378 Views
Hello! Im using Xcode 13 beta 2 , building on Apple TV 4K, tvOS 15.0 (physical device) I was implementing new functionality into the tvOS app I'm working on and encountered some difficulties trying to use new .transportBarCustomMenuItems property. I'm creating a UIMenu, debug shows that Menu has children and overlay shows my created items, but when I'm trying to click on it, nothing happens, nor menus or actions don't call handler func I'm providing and those pretty controls im adding just have no use. Help me understand if I'm doing something wrong. He's pseudo code im using private func createLocalizationMenuControl() -> UIMenuElement? { let image = UIImage(systemName: "gear") let menuChildren = localizations.compactMap { [weak self] localization in self?.createLocaliztionAction(from: localization) } return menu = UIMenu(title: "Localizations", image: image, options: [.singleSelection], children: menuChildren) } private func createLocaliztionAction(from localization: Localiztion) -> UIAction { return UIAction(title: localization.name, state: localization.isAvailable ? .on : .off, handler: { [weak self] _ in self?.didSelectLocalization($0) }) } Note: if I'm settings options: [.singleSelection, .displayInline] for UIMenu like it was shown in wwdc21-10191 session - its not displayed at all. I am starting to believe its beta related. Any ideas why this could be happening or how to make it work? Maybe anyone from Apple engineer team could help me understand how do parameters of the UIMenu reflect on its behaviour. Unfortunately there's not that much docs on this functionality yet. I would be very grateful if someone could explain this one to me.
Posted
by
Post not yet marked as solved
1 Replies
397 Views
AVPlayerViewController in tvOS 15 should display a live badge (see https://developer.apple.com/videos/play/wwdc2021-10191/?time=188) when there is a live content being played. But badge is not showing up. I tried suppling externalMetadata for title and subtitle to trigger the Title View but it doesn’t help. Badge will not show. Not sure if it is a bug (created FB9620879) or there are other conditions (settings or metadata) needed. I tried with many live streams including https://moctobpltc-i.akamaihd.net/hls/live/571329/eight/playlist.m3u8 Any help will be appreciated
Posted
by
Post not yet marked as solved
1 Replies
609 Views
I'm encountering UI update issues whenever I'm selecting an option for new quality from the menu in new tvOS 15.0 controls. FYI: selecting a quality makes a new content node and replaces previous node in player. However the behaviour is different for two cases whenever I select an option while content is PLAYING - focus update is okay and and i get the expected outcome. whenever I select an option while content is ON PAUSE - focus update crashes ui and it moves to previously opened screen while im hearing player playing somewhere in the back WHEN PLAYING The focus debug just before focus update shows: AVPlayerViewController.view.preferredFocusEnvironments: a. _AVPlayerViewControllerContainerView (skipping collectionView) <_AVPlayerViewControllerContainerView: 0x7fa0d27f5b30; frame = (0 0; 1920 1080); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600000f7de90>; layer = <CALayer: 0x6000000df8a0>> (view controller is <AVPlayerViewController: 0x7fa0d31f4a00> b. container's preferred focusEnvironments: <_AVFocusContainerView: 0x7fa0c68a4c30; frame = (0 0; 1920 1080); gestureRecognizers = <NSArray: 0x600000f68e40>; layer = <CALayer: 0x6000000d79a0>> (view controller is <AVPlayerViewController: 0x7fa0d31f4a00>) WHEN IN PAUSE The focus debug just before focus update in this case shows: a. CollectionView - the customMenuItems collectionView <UICollectionView: 0x7fa0d3143800; frame = (0 844; 1920 64); autoresize = W+H; gestureRecognizers = <NSArray: 0x600000f43300>; layer = <CALayer: 0x6000000dccc0>; contentOffset: {0, 0}; contentSize: {1760, 64}; adjustedContentInset: {0, 0, 0, 0}; layout: <AVxCollectionViewLayout: 0x7fa0d2760580>; dataSource: <AVxCollectionViewController: 0x7fa0c6873e00>> b. CollectionView.preferredFocusEnvironments is cell - is one of customMenuItems <AVxOverlayToolCell: 0x7fa0dd721140; baseClass = UICollectionViewCell; frame = (1606 0; 64 64); layer = <CALayer: 0x60000012b980>> c. Cell's preferredFocusEnvironments is empty. I don't know if its native bug or there's a way to solve this myself.
Posted
by
Post not yet marked as solved
0 Replies
276 Views
I work in JDK maintaining Java Client library..Apple has contributed macosx port to JDK 6 which we stil currently use in Java and we are running JDK18. We have one test where we create a Child Java process where we try to set fullscreen window and then find a display mode which is different from current display and then again revert back to normal windowed mode. The test in question is https://github.com/openjdk/jdk/blob/master/test/jdk/java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java This test has worked till now till Macos BigSur but on recent Macos 12 Beta os version, it is hanging in CGCompleteDisplayConfiguration() https://github.com/openjdk/jdk/blob/master/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m#L297 I see that we have displayId:724860118, w:1280, h:720, bpp:32, refrate 60 when we call nativeSetDisplayMode() to fullscreen and displayId:724860118, w:1920, h:1080, bpp:32, refrate 60 when we go back to normal mode. We see that in BigSur we get the same values but CGCompleteDisplayConfiguration() executes ok. We see that if we change performOnMainThreadWaiting to NO in https://github.com/openjdk/jdk/blob/master/src/java.desktop/macosx/native/libosxapp/ThreadUtilities.m#L102 where ThreadUtilities performOnMainThreadWaiting method is defined in [1] it works ok in macos12 but was told it's not the correct way to fix this in https://github.com/openjdk/jdk/pull/5647/ and report this to Apple Can you please suggest how to fix this for osx 12? the device used is Macmini8_1 running Intel_R__Core_TM__i7-8700B_CPU___3.20GHz [1] https://github.com/openjdk/jdk/blob/master/src/java.desktop/macosx/native/libosxapp/ThreadUtilities.m#L102
Posted
by