I have this MPMovePlayerController and a custom slider (which is not quite a slider, but it has the same purpose). Considering that my "slider" can return any float value I need, how can I change the volume of the played movie?
So far I'v tried hacking MPVolumeView to programmatically set a value, w/o success.
iOS 3.0 - 7.0
Turns out that
[[MPMusicPlayerController applicationMusicPlayer] setVolume:<insert float here>];
works for any sound in the app, even the MPMoviePlayerController, if it's using the main Audio Session. O, it works only on the device, not the simulator. More info here:
https://developer.apple.com/documentation/mediaplayer/mpmusicplayercontroller?language=objc
Update
Volume is deprecated in iOS 7.0.
"To provide UI for adjusting system playback volume, use the MPVolumeView class, which provides media playback controls that iOS users expect and whose appearance you can customize." Deprecated MPMusicPlayerController Volume Method
[[MPMusicPlayerController applicationMusicPlayer] setVolume:<insert float here>];
Will change the device's volume, not the media player's so any other audio or video streams are also affected.
Related
The idea is to create an app that can read any local camera device, filter it, then have a new camera "virtual device" other apps can use as input.
How can this be done with UWP?
How can this be done with UWP?
Only the first part of your requirements could be done in UWP apps - can read any local camera device, filter it. UWP could connect to the local camera for capturing photo and video. You could also modify the media content as you want. More information could be known here: Camera - UWP.
But UWP apps are not able to send the camera to other apps as a virtual device. You might need to try other ways like win32 to achieve this.
I have a nativescript-app that uses text-to-speech functionality (#nativescript-community/texttospeech).
This is working fine so far.
Now, I open a modal-view with the #nstudio/camera-plus plugin that enables the user to capture a photo.
After closing the camera-view, the audio of the text-to-speech is only half as loud as before.
Is the camera messing up the audio-settings? And if so, how can I avoid that?
Nativescript 8.1
texttospeech 3.0.3
camera-plus 4.0.3
Didn't find the cause for this, but at least a workaround.
I put this above every audio-related task:
AVAudioSession.sharedInstance().setCategoryWithOptionsError( AVAudioSessionCategoryPlayAndRecord, AVAudioSessionCategoryOptions.DefaultToSpeaker);
That sets the volume back to full.
I am evaluating Unity3d 2017.4.2f2 with Vuforia and Xcode 9.3 for an AR App and have the problem, that the camera background works in the simulator but not on the iPad pro with iOS 11.3,1.
It seems to be a known problem and I checked nearly every solution including using XCode9.2 and copying the device config, deleting Metal from the Vuforia Settings, creating new AR Cameras, even the latest Unity3D beta and whatnot. The background does not show up and I get the following error:
2018-05-03 14:53:33.396112+0200 ProductName[2340:1694266] ERROR/AR(2340) 2018-05-04 14:53:33: CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.
and
cameraDeviceStartCamera
2018-05-03 14:53:33.460389+0200 ProductName[2340:1694266] ERROR/AR(2340) 2018-05-04 14:53:33: VideoBackgroundConfig with screen size of zero received, skipping config step
If there is anything else I can do or that points me into the right direction is appreciated. many thanks in advance
Just to be sure check if you did all of this:
In player settings enable Vuforia's support
Go to player settings >> Other Settings and check Camera Usage Description field
Then you can try one of the following suggestions:
change the Target resolution to native (default device resolution)
set the graphics to be OpenGLES2.0 instead of automatic
If this doesn't work you can also try to delete the meta data of the camera controller script.
Removing Unity3D completely and reinstalling the latest Unity3D version and the VuforiaSupportInstaller-Mac-7-1-35 solved it. Both accessible via the Vuforia Download page
The task:
OS: Mac OS X 10.9 +
Description:
There is web-camera connected to a Mac via USB. I need to discover a way of getting access to its' brightness, pan, color temperature, focus, etc.
I also need a way to apply image filters against camera's video stream.
I need to be able to control the camera while it is being used by other programs like Skype, so I can transmit for example video stream with increased contrast at Skype video call.
Reference app: https://itunes.apple.com/app/webcam-settings/id533696630?mt=12
Solution:
This is the question.
As far as I understood I must to find custom kext (driver) in order to perform all this magic.
Could you please show me right direction, libraries, drivers, etc.
You can use opencv library to capture camera frames, apply filters, etc.
http://docs.opencv.org/2.4/doc/tutorials/introduction/display_image/display_image.html
Then you can feed a virtual cam that can feed into Skype, etc.
http://download.cnet.com/Virtual-Webcam/3000-2348_4-75754338.html
There also many open source virtual webcam available.
I hope this helps.
I am making a app involve the use of camera. However, ipad1 does not support and crash when press the camera.
How can I choose that app only support ipad2 but not ipad1?
Is there anything i can set in the setting or any code i can type in?
Thank you all.
You can specify device requirements in the info.plist You would just specify that it needs a camera