Camera Kit Web SDK on iOS devices audio issues?

Options
Benedict Wong
Benedict Wong Posts: 2
edited March 13 in General #1

I've been experimenting with Camera Kit on Web for iOS devices. I've got a setup currently with an image object that uses a video as its texture. On Android devices, this shows up correctly with both video and audio being seen and heard. However, on iOS (for both Safari and Chrome), only the video is working. Are there specific logic workarounds I need to work with to get it working on iOS?

I've already followed all of the suggested fixes as well, from making sure silent mode is off, restarting the device, making sure audio codecs on the video are compatible with iOS devices, etc.

Answers

  • Michael Mase
    Michael Mase Posts: 66 🔥🔥
    Options

    Hi @Benedict Wong! Thank you for your post. If you could share some sample code, that would help us figure out what's going on better. Generally, you should be able to able to find success with code from our sample apps: https://camera-kit.snapchat.com/websdk/sample/basic

  • Benedict Wong
    Options

    I've got a button that changes the videos in an array, labeled textures. The button then cycles through X, where X is a variable number between 1 and 5 and sets the image object's texture as the video. The video by default is set to autoplay off but volume is set to 1.0.

    function changeVideo(x) {
        var newMat = script.videoTarget.mainMaterial.clone()
        newMat.mainPass.baseTex = script.textures[x-1]
        script.videoTarget.mainMaterial = newMat
        videoTargetTex = script.videoTarget.mainPass.baseTex
        videoTargetTex.control.play(-1)
    }
    

    On the web side of things, it is using the code provided on the link, nothing additional or fancy.

  • amelia smith
    Options

    It appears that you've conducted a thorough investigation into the issue. Since the video is functioning properly but the audio isn't on iOS devices, it suggests there may be specific considerations or implementation nuances for iOS that require attention.

    Firstly, it's advisable to verify whether there are any iOS-specific requirements or limitations for audio playback within the Camera Kit framework. This could involve consulting the official documentation or seeking insights from experienced developers familiar with iOS development.

    Furthermore, exploring potential disparities in how Safari and Chrome handle audio playback on iOS might provide valuable insights. It's essential to understand any divergent behavior between these browsers and how they interact with multimedia elements.

    Lastly, reaching out to the developer community or forums dedicated to iOS development could yield additional troubleshooting steps or insights. You can also visit this website related to the Scarlet community. There is a team of iOS app developers who can help you figure out the issue. Often, such developers may have encountered similar challenges and can offer practical advice or solutions based on their experiences.