- Home /
ReplayKit can not include user commentary and camera footage while broadcasting
The code is below:
public class buttons : MonoBehaviour {
void Start () {
ReplayKit.cameraEnabled = true;
ReplayKit.microphoneEnabled = true;
}
void OnGUI ()
{
GUI.Box (new Rect (2 * 10, 2 * 10, 2 * 200, 4 * 90), "Broadcasting");
if (GUI.Button (new Rect (2 * 20, 2 * 40, 2 * 180, 2 * 30), "Start Broadcasting")) {
ReplayKit.StartBroadcasting ((bool success, string error) => Debug.Log (string.Format ("Start : {0}, error : `{1}`", success, error)),true,true);
showRet=ReplayKit.ShowCameraPreviewAt (50, 50);
}
if (GUI.Button (new Rect (2 * 20, 2 * 70, 2 * 180, 2 * 30), "Stop Broadcasting")) {
ReplayKit.StopBroadcasting();
}
}
}
Broadcasting is started successfully,but can not include user commentary and camera footage.I have written privacy description in info.plist,but it seems that camera and microphone are not enabled. Does anyone know how to use UnityEngine.Apple.ReplayKit? Thanks!
Your code looks right to me. I can get replay kit to include the screen and microphone, but have yet to see the preview camera work for either broadcast or record modes.
Your answer
Follow this Question
Related Questions
Can't call GameCenter in my Unity game for iOS 0 Answers
[Solved] error copying file from streaming assets on IOS 1 Answer
IL2CPP does not support marshaling delegates that point to instance methods to native code. 1 Answer
MarshalAs UnmanagedType.LPArray always returns with array of size 1 in iOS 0 Answers
DateTime.now not working on iOS 0 Answers