How to fill metadata info for tvOS info panel when using Airplay? - ios

I'm barely new to iOS.
I'm able to reproduce streams(no local video) via AVPlayer using Airplay.
Also, MPNowPlayingInfo and RemoteCommandManager are supported, using external medatada, not included into the streams.
But, I would like to fill the info panel with title, artwork, etc. on AppleTv/tvOS.
The image is part of WWDC17 talk titled "Now Playing and Remote 
 Commands on tvOS".
My question is not about tvOS apps, which the referenced talk is about, but about a iOS app that plays video via Airplay.
My guess is that the played AVAsset needs to have medatada, which currently would be empty.
I've been checking AVMutableMetaDataItem, but still don't understand if that's what I would need to use, nor how to do it.
Does anyone has any hint?

The WWDC 2019 Talk :( https://developer.apple.com/videos/play/wwdc2019/503/ ) which is about Delivering Intuitive Media Playback with AVKit speaks about using the external metadata during Airplay and how they have provided the API for iOS now which is similar to what was present on tvOS. (Refer from duration of 7 minutes in the Video mentioned above where they explain the same.) Hope this helps:)

Related

How to programmatically change video codec in Xamarin iOS

I've recently run into a issue with taking video on new iPhones(8 and up) written in Xamarin. When capturing the video video on older devices the codec is H.264, but on new devices Apple has switch to H.265. These videos are played in browser and pretty much everything I've checked doesn't support H.265.
Since you can change in the setting of the device between (high efficiency-H.265 and most compatiable-H.264), I figured you can do this programmatically. I haven't been able to find any information on how to do this if at all. Any help would be appreciated.
You can set the codec on a AVCaptureVideoDataOutput, which you add to your Session, through WeakVideoSettings which is just a dictionary of settings.
You can find the keys in the official apple docs: https://developer.apple.com/documentation/avfoundation/avassetwriterinput/video_settings_dictionaries

is there any way to control system volume from a app in objective c

I downloaded a app named "aurio Touch" from apple for ios platform. It captures the background sound using microphone and plays it simulteniously with other media sound (like, itunes songs, online songs etc). I want to control the capturing sound volume and media sound volume separately. so, Here is my question that is that possible or not. if possible then how can it achieved.
Please help.
Advance Thanks.....

Programatically upload a video to Youtube

I am currently trying to programmatically upload a video from an iOS device to Youtube, but all of the information I am finding is incredibly dated.
I have explored the Google API Cocoapod, but the documentation around using it is rather weak, so I could not find a good starting point.
Other answers on here lead off to four year old projects that are now broken.
Hoping someone can point me to a current example, tutorial or other documentation on how to upload through iOS.
I have never done this but I m sure following link will help you.
1.Upload Videos to YouTube with iPhone custom App
2.Uploading Video with iPhone
3.YouTube Data API.
4. Upload Video on you tube.

Apple Music Offline Files Have no URL?

It seems that the property MPMediaItemPropertyAssetURL on a MPMediaItem returns null when the file is one that was from Apple Music and has been made "available offline".
On the other hand, items from my original library which I uploaded to iTunes match/apple music and then make available offline don't seem to have this problem.
Is this a bug? Have I done something wrong? Anyone having similar issues?
It seems that Apple Music files are DRM-protected and subscription based, so probably Apple prohibits the use of references to these assets due to rights management.
Reference: https://forums.developer.apple.com/thread/7389
Things have changed a little and this isn't true anymore. MPMediaItemPropertyAssetURL is not nil on iOS 11 for songs saved offline via Apple Music but AVPlayer is unable to play them since they are still DRM protected. The same song returns MPMediaItemPropertyAssetURL nil on iOS 9.
If you are interested in checking for DRM protected songs or in playing such songs, you can read my detailed answer here: https://stackoverflow.com/a/47694472/4331787

Add Music to iOS programmatically

Let say I want to create an iOS app that download music files from the internet.
Is it possible then to put this music files on the Music Library so that I can play it?
It's not possible. The only way to add music to your library is through iTunes or through the iTunes Store app. Even if you did find a way, it'd probably be through some private API and you'd probably get rejected on the app store.
As Simon said, you won't get music into the native music library. You could however store the audio files and use the AVFoundation Framework (AVAudioPlayer class) to replay them. You could also possibbly use the AudioToolbox framework. Problem is you would have to implement your own music library and your own playback functionality.
Did I mention you have roughly a 0% chance of this app making it into the app store?
It is clearly possible though...even trivial...
Well, in terms of possibility, it is possible if you jailbreak your device, you'd need 2 tweaks to do it:
"Safari download enabler" or manager: to allow you to download files.
"Bride": allows you to import downloaded or saved mp3 files or mp4 video files to your iOS library.
I've been using it for a while and it works like magic
You can have private API/Library. Though I never tried, but you can.
Here is the another similar post:
Programmatically add content to music library

Resources