AVPlayerViewController can perform a lot of work like switching audio/subtitles tracks, draw progress bar, retrieving thumbnails etc. On tvOS it automatically display builtin tracks in top bar and accept event from remote control.
It recognize WebVTT subtitles and can display user selected track. But it doesn't work with SMPT-ETT/TTML subtitles. There is a way to manually decode and display subtitles of these formats. But is there a way to add a button with track language to a "Subtitles" chapter?
If you create a new AVMediaSelectionOption of type AVMediaCharacteristicLegible and add it to AVAsset's mediaSelectionGroup(AVMediaSelectionGroup) and provide that asset to the AVPlayer it should show up in that list above the player.
Related
This is an iOS problem.
I want to design a screen which will show a video on full screen. After some time based on some backend condition if another video is available I have to show that by splitting the screen into two vertical halves. After some time if one more video is available I have to again split the screen and show the third video horizontally on the bottom of the screen.
I am new to iOS and I am not able to manage the screen split on runtime based on backend condition. please help me in this regard.
Using AVPlayer it possible to play multiple videos in a view. You can use Apple's AVPlayer.
An AVPlayer is a controller object used to manage the playback and
timing of a media asset. You can use an AVPlayer to play local and
remote file-based media, such as QuickTime movies and MP3 audio files,
as well as audiovisual media served using HTTP Live Streaming.
We are building a TV application with user login and playing videos with search functionality. So we have designed our home screen with catalog template as in the below picture.
https://i.stack.imgur.com/1BWjl.jpg
Our Pending tasks are
1. Playing Videos in overlay with tag.
We are trying to achieve overlay with videofiles in a shelf. An api call result gives a list of videos which has to play in video player. The first item in the array should play in video player and remaining array items should display as overlay in the shelf. On mouse over, video file in overlay, should play in the overlay itself, with the help of tag, just like thumbnail video play. We tried a lot to play a video in overlay with the tag. But we couldn't do that.
A progress bar to be displayed on the current video which is being
playing.
We expected video play with progress bar and overlay on video player, but we got the output as in the link. https://i.stack.imgur.com/gepIo.jpg.
Progress bar is missing and videos inside the overlay are not playing.
Search functionality
End user can be able to search other users. So we have planned search functionality as a separate link. We have implemented search functionality as a separate template. Its working perfectly, but if i add it in the catalog template as a list item, search template is not loading.
Here is the code for the above application.
https://github.com/TVMLBegnr/TVMLApp
Can any one help me on these tasks. I am not finding TVML experienced people. I can even pay for the tasks.
When watching a live stream, the subtitles menu option is still present on the video view.
How can I hide the complete subtitles group? If the display should be managed by the m3u8, how must the m3u8 look like that the subtitles menu disappears?
Subtitles are embedded into the HLS stream. AVPlayerViewController defines a property called allowedSubtitleOptionLanguages which allows to limit the allowed set of languages supported for the subtitles.
In order to disable completely the subtitles tab you could assign an empty list of allowed languages to that property:
playerViewController?.allowedSubtitleOptionLanguages = [""]
I am using a light box type of player to open and play you tube videos. My people don't want the video link to be accessible or shared from within the player.
I.E they only want the video to play when the video loads in the player. So they don't want the share button visible and they don't want the YouTube icon that links directly to the video visible.
I can remove the share button and I can remove the YouTube icon but not at the same time.So there is always an easy way for the user to get the video url and share it etc...
I can also chose the videos to be private and that removes both. But then all of my users would need a google account which they dont.
It seems to me that Google wouldn't offer free use to its player without some type of reference to You Tube. Either with the share button or the You Tube icon that links to the video.
i have tried modifying the url parameters (embed?v=#v_ID#&rel=0&autohide=1&showinfo=0&wmode=transparent&modestbranding=1&controls=0") to no avail.
And I have tried using embed and watch to no avail..
Is there a way to do this?
You can append the following onto the end of the YouTube embed url, to remove the Watch on YouTube button from the playback controls which is accomplished by setting modestbranding to 1. The player controls are NOT removed. they are just auto0hidden by setting the parameter autohide to 1.
Try to change & to &
Here's a sample format to solves your issue:
Now, our app, pikSpeak Camera, was recently found useful to blind iOS community as it allowed to capture photos with sound as it allowed them to easily navigate through older pics just using the the audio tags.
The issue that I am facing is that I want to override the Voiceover audio tag associated with an element when a user selects it and instead have a custom audio in the UICollectionViewController cell selection.
Basically, I guess it's easy to disable the VO tag audio but then how do I play a custom audio on VO selection?