avplayer

Subtitles won't display if closed caption is off in system settings

一世执手 提交于 2021-02-20 00:41:29
问题 I am trying to get subtitles to display regardless of what the device has set under the accessibilities. Currently, if the device is set to English with closed captioning enabled in settings, English subtitles will play, and if the device is set to Spanish, Spanish subtitles will play. I would like subtitles to play regardless of whether or not closed captioning is on. I attempted to add this code from apple's documentation, but it did not help. It seems to be reading the options fine,

Can't able to get Video Tracks from AVURLAsset for HLS videos(.m3u8 format) for AVPlayer?

a 夏天 提交于 2021-02-18 17:40:08
问题 I am developing a custom video player to stream HLS videos from server. I can successfully play HLS videos using AVPlayerItem and AVPlayer. After that I want to add subtitle track and audio tracks for my video player. So I used AVMutableComposition to do so. So now the issue is when I am creating AVURLAsset for HLS Videos, I can't able to get video tracks from AVURLAsset. It is giving me always 0 tracks. I tried "loadValuesAsynchronously" of AVURLAsset and I tried adding KVO for "tracks" of

How to interleave a non-interleaved AudioBufferList inside a render callback?

孤街醉人 提交于 2021-02-11 06:53:34
问题 I'm working on a project that involves streaming audio from an AVPlayer video player object into libpd using an MTAudioProcessingTap . For the process loop of the tap, I used PdAudioUnit s render callback code as a guide; but I realized recently that the audio format expected by libpd is not the same as the audio coming from the tap — that is, the tap is providing two buffers of non-interleaved audio data in the incoming AudioBufferList, whereas libpd expects interleaved samples. I don't

Is there a way to stop the avplayer sending a range http header field

﹥>﹥吖頭↗ 提交于 2021-02-08 16:52:45
问题 If you load remote files with the AVPlayer it sends a http request with a range field in the request header, something like Range: bytes=0-8148096 I like to use the SevenDigital commercial API for streaming songs but they cannot handle this Range header. Is there a way to change the URL requests the AVPlayer sends? 回答1: Nope, and it is an apple standard that media providers need to support http 1.1 with the range header (check out the iTunes store guidelines for podcasts for example), so I

Is there a way to stop the avplayer sending a range http header field

两盒软妹~` 提交于 2021-02-08 16:47:32
问题 If you load remote files with the AVPlayer it sends a http request with a range field in the request header, something like Range: bytes=0-8148096 I like to use the SevenDigital commercial API for streaming songs but they cannot handle this Range header. Is there a way to change the URL requests the AVPlayer sends? 回答1: Nope, and it is an apple standard that media providers need to support http 1.1 with the range header (check out the iTunes store guidelines for podcasts for example), so I

Is there a way to stop the avplayer sending a range http header field

徘徊边缘 提交于 2021-02-08 16:43:22
问题 If you load remote files with the AVPlayer it sends a http request with a range field in the request header, something like Range: bytes=0-8148096 I like to use the SevenDigital commercial API for streaming songs but they cannot handle this Range header. Is there a way to change the URL requests the AVPlayer sends? 回答1: Nope, and it is an apple standard that media providers need to support http 1.1 with the range header (check out the iTunes store guidelines for podcasts for example), so I

Is there a way to stop the avplayer sending a range http header field

安稳与你 提交于 2021-02-08 16:43:00
问题 If you load remote files with the AVPlayer it sends a http request with a range field in the request header, something like Range: bytes=0-8148096 I like to use the SevenDigital commercial API for streaming songs but they cannot handle this Range header. Is there a way to change the URL requests the AVPlayer sends? 回答1: Nope, and it is an apple standard that media providers need to support http 1.1 with the range header (check out the iTunes store guidelines for podcasts for example), so I

AVPlayerLayer isn't showing AVPlayer video?

ⅰ亾dé卋堺 提交于 2021-02-08 14:53:08
问题 What's the trick to getting AVPlayer video content to show up in one's view? We are using the following AVPlayer code but nothing is appearing on screen. We know the video is there because we were able to show it using an MPMoviePlayerController. Here is the code we are using: AVAsset *asset = [AVAsset assetWithURL:videoTempURL]; AVPlayerItem *item = [[AVPlayerItem alloc] initWithAsset:asset]; AVPlayer *player = [[AVPlayer alloc] initWithPlayerItem:item]; player.actionAtItemEnd =

Workaround playing a video .mov file in iOS app? Also related to Adobe Flash Animations

落爺英雄遲暮 提交于 2021-02-07 18:22:30
问题 After researching lots on StackOverflow and Class References, iOS MPMoviePlayerController cannot play .mov video files. AVPlayer can play .mov files but there are no controls. I want my app to play .mov files, because Adobe Flash Animation provides .mov as the cleanest and native looking video. If I convert the same video to mp4 (supported formats) there is loss in quality, even when I turn the video rate to 100 MB/s and highest quality video. Quite ironic, QuickTime is Apple's intellectual

Workaround playing a video .mov file in iOS app? Also related to Adobe Flash Animations

不羁的心 提交于 2021-02-07 18:22:09
问题 After researching lots on StackOverflow and Class References, iOS MPMoviePlayerController cannot play .mov video files. AVPlayer can play .mov files but there are no controls. I want my app to play .mov files, because Adobe Flash Animation provides .mov as the cleanest and native looking video. If I convert the same video to mp4 (supported formats) there is loss in quality, even when I turn the video rate to 100 MB/s and highest quality video. Quite ironic, QuickTime is Apple's intellectual