Giter Club home page Giter Club logo

Comments (4)

kuajia avatar kuajia commented on June 9, 2024 1

Sorry, I forgot it... I used an iPhone X

from arvideokit.

AFathi avatar AFathi commented on June 9, 2024

@kuajia,
Do you mind sharing what device were you testing on?

from arvideokit.

AFathi avatar AFathi commented on June 9, 2024

@kuajia,
There are 2 different ways to temporarily fix this issue:

  1. Add a minimum of 1 second before allowing the user to stop the video recorder.

  2. If you're using the open-sourced version of ARVideoKit, you may go to the ARVideoKit/Rendering/Writer/WritAR.swift file and replace the function end(writing ) with the following block of code:

    func end(writing finished: @escaping () -> Void){
        if let session = session {
            if session.isRunning {
                session.stopRunning()
            }
        }
        
        if assetWriter.status == .writing {
            assetWriter.finishWriting(completionHandler: finished)
        }
    }

Only difference in the code block above is that I added a base case to check whether the AVAssetWriter is writing or not, before stopping the video writer.

Edit: - I just tested the second option I suggested and it fixed the issue! However, it caused some other unnoticeable bugs. I'll work on fixing those bugs and push an update soon 😊

-Ahmed

from arvideokit.

AFathi avatar AFathi commented on June 9, 2024

Fix for the issue has been included in v. 1.3

from arvideokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.