AVAudioEngine, AVPlayer, AVPlayerViewController - Control Center controls becomes disabled when AVPlayerViewController plays video - swift3

I am using AVAudioEngine to play audio files and AVPlayer and AVPlayerViewController to play videos.
and Control Center notification are enabled UIApplication.shared.beginReceivingRemoteControlEvents()
Control Center works perfectly for audio files (play/pause/next/prev/slider) if no video file is played (if no AVPlayerViewController instance exists)
but as soon as I play a video file and then dismiss the AVPlayerViewController and play audio file, all the controls in the Control Center becomes disable.
refreshing nowPlayingInfo does not work - it only updates the thumbnail and audio title
After dismissing AVPlayerViewController

Related

Handle up/down buttons of Chromecast Voice Remote on Chromecast receiver side

I'm casting from iOS/Android to Google Chromecast device and trying to switch channels by clicking up/down buttons, but can not catch an event if Up or Down button has been clicked.
Tried to listen for all events from cast.framework.events.EventType.ALL but I receive only final events like (PLAY, PAUSE, TIME_UPDATE, etc.)
const context = cast.framework.CastReceiverContext.getInstance();
const playerManager = context?.getPlayerManager();
playerManager?.addEventListener(cast.framework.events.EventType.ALL, (event) => {
logScreen.info(`event: ${event.type}`);
});
Maybe somebody knows how to catch an event/message that up/down button called on Chromecast Voice Remote?
Thanks

Connectycube video and audio mute option not working on website using javascript

I'm using the javascript method of connectycube for video call implementation on my website. Followed this link for implementation.
I'm using this command session.mute("video"); for muting my video. Mute video works on the caller side, but it's not working on the receiver end. If I trigger mute video on the receiver end the receiver's local stream is hidden. But the remote video stream of the receiver shown to the caller is not muted. The session is created by calling the createVideoSession function on both the sender and receiver sides.
This is the response i got by consoling the video session created on both the receiver and caller side.
caller
ID: 1c0d7fb7-428a-4c2b-bea9-b100bb6c9119, initiatorID: 5806679, opponentsIDs: 5815895, state: 2, callType: 1
Receiver
ID: 517d58b2-f654-480b-b255-0e3f2abc1cea, initiatorID: 5815895, opponentsIDs: 5806679, state: 1, callType: 1
what I'm missing from my code?

Why is the image being removed from the cache? | Kingfisher

I am using Kingfisher on SwiftUI. I download the image from url with Kingfisher
I will explain the problem step by step:
I download the image from url
After I close my own application from the background, I open the Instagram application and scroll down continuously on the main page and I make the Instagram application use the cache.
Then I turn off the internet and open my own application.
Problem: When I turn off my internet and open my own application again, I cannot get the pictures from the cache. Why ?
.diskCacheAccessExtending(.expirationTime(.never)) and .diskCacheExpiration(.never) I used these two functions, but the images are still deleted from the cache.
KFImage:
KFImage.url(URL(string: value))
.resizing(referenceSize: CGSize(width: 50, height: 50), mode: .aspectFit)
.diskCacheExpiration(.never) // 1
.diskCacheAccessExtending(.expirationTime(.never)) // 2
.loadDiskFileSynchronously()
.fade(duration: 1)

How to trigger and process a stream's interruption on AWS MediaLive?

I have a MediaLive channel with attached input and OBS streaming into it. An output in several different resolutions saves into a bucket on AWS MediaStore. Everything goes well until eventually, my client loses a connection for a few minutes. During this downtime, MediaLive records a video with a black screen.
1) Can I prevent MediaLive from streaming the "black" video, stop output and wait for the streamer to connect again?
2) Can I replace a black screen with some image as a placeholder to notify users what's happening?
3) Can I trigger somehow when the streamer connects or disconnects from the input?
In the channel settings, there is an option which I suspect to be the answer - Blackout Slate. That's how it looks in the web interface:
The info block states the following:
Setting to enabled causes the encoder to blackout the video, audio, and captions, and raise the "Network Blackout Image" slate when an SCTE104/35 Network End Segmentation Descriptor is encountered. The blackout will be lifted when the Network Start Segmentation Descriptor is encountered. The Network End and Network Start descriptors must contain a network ID that matches the value entered in "Network ID".
But after setting images here everything stays the same - only the black screen with no sign of those placeholders.
On your Output Group settings is a field called Input Loss Action. If you change that from EMIT_OUTPUT to PAUSE_OUTPUT you should get the desired result.
Alternately, you can enable an Input Loss Behavior in the channel's general settings (Global Configuration section) that will allow you to specify either a solid color screen or an input loss image slate, as well as the timing for how long to wait before displaying the slate image.
Regards,

File upload on AWS S3 Storage IOS in sequential order

I am working on chat application where I need to send media files (Image Audio Video, etc) to S3 storage using AWS IOS SDK v2.2.x.
I an sending all files for upload in a loop using AWSS3FileTransferManager by creating multiple upload requests. The uploads are working with callbacks coming from files in order of the one that finished first.
I am looking for an input as to how S3 can send me the finish callbacks in the same order as my upload request order.
Example:
Order I send
Image (10KB)
Video (2MB)
Image (10MB)
Video (50MB)
Audio (5MB)
Image (5KB)
Expected order received
Image (10KB)
Video (2MB)
Image (10MB)
Video (50MB)
Audio (5MB)
Image (5KB)
Observed order received
Image (5KB)
Image (10KB)
Video (2MB)
Audio (5MB)
Image (10MB)
Video (50MB)
Can there be some provision that even if the task hass finished its work for upload, the callback is received only after its previous task are completed and sent or else queued? And if the previous task has timed-out and failed then only the immediate next task is processed?