Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

接続中にキャプチャラを切り替える機能を実装 #76

Merged
merged 4 commits into from
Sep 5, 2023

Conversation

melpon
Copy link
Contributor

@melpon melpon commented Jul 31, 2023

こんな風に利用可能です。

// デバイスカメラに切り替える場合
sora.SwitchCamera(CameraConfig.FromDeviceCamera(videoCapturerDevice, videoWidth, videoHeight, videoFps));
// Unity カメラに切り替える場合
sora.SwitchCamera(CameraConfig.FromUnityCamera(unityCamera, 16, videoWidth, videoHeight, videoFps));

また、Sora.Config に含まれていた以下の7つのフィールドは Sora.CameraConfig に移動しました(破壊的変更)。

  • CapturerType
  • UnityCamera
  • UnityCameraRenderTargetDepthBuffer
  • VideoCapturerDevice
  • VideoWidth
  • VideoHeight
  • VideoFps

もしこれらのフィールドを以下のように Sora.Config に設定している場合、

Sora.Config config = new Sora.Config()
{
    SignalingUrl = signalingUrl,
    SignalingUrlCandidate = signalingUrlCandidate,
    ChannelId = channelId,
    ClientId = clientId,
    BundleId = bundleId,
    ...
    CapturerType = Sora.CapturerType.DeviceCamera,
    VideoCapturerDevice = videoCapturerDevice,
    VideoWidth = videoWidth,
    VideoHeight = videoHeight,
    VideoFps = videoFps,
};

以下のように書き換える必要があります。

Sora.Config config = new Sora.Config()
{
    SignalingUrl = signalingUrl,
    SignalingUrlCandidate = signalingUrlCandidate,
    ChannelId = channelId,
    ClientId = clientId,
    BundleId = bundleId,
    ...
    CameraConfig = new Sora.CameraConfig()
    {
        CapturerType = Sora.CapturerType.DeviceCamera,
        VideoCapturerDevice = videoCapturerDevice,
        VideoWidth = videoWidth,
        VideoHeight = videoHeight,
        VideoFps = videoFps,
    },
};

@torikizi torikizi self-requested a review August 27, 2023 05:15
@voluntas
Copy link
Member

voluntas commented Sep 5, 2023

優先実装依頼特別対応として検証は後回しにし develop ブランチへのマージを行います。

Copy link
Member

@voluntas voluntas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

検証は後回し

@voluntas voluntas merged commit 5d710be into develop Sep 5, 2023
@voluntas voluntas deleted the feature/switch-camera branch September 5, 2023 05:48
@voluntas voluntas restored the feature/switch-camera branch September 6, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants