Giter Club home page Giter Club logo

Comments (6)

ajwfrost avatar ajwfrost commented on June 2, 2024

Hi - you should only call play(null) once .. is there a specific need to call it multiple times?
We've got some protection in there now because of some other changes we'd made around this - so calling play(null) on an already-playing stream isn't valid. I guess we could add the condition that it's okay if you'd previously started the stream with the same call...

I would be interested if you think there is a need for that, or whether you could update your code so that only the first call is made, without any other side effects?

thanks

from adobe-runtime-support.

itlancer avatar itlancer commented on June 2, 2024

@koreaflash
Also make sure you don't use ns.play(""); anymore. #3098

from adobe-runtime-support.

koreaflash avatar koreaflash commented on June 2, 2024

I will try update the code.
Thank you.

from adobe-runtime-support.

koreaflash avatar koreaflash commented on June 2, 2024
  • We provide educational content.
  • Users can learn page by page and move pages freely.
    => Users can access pages containing netstream from time to time.
  • There is a function to preload the front or back page of the current page.
    => Users can also use 3 netstreams at the same time.

For the above reasons, play() is called frequently.
Is there a solution...?

from adobe-runtime-support.

ajwfrost avatar ajwfrost commented on June 2, 2024

Well we can change it so that play(null) is accepted as long as the previous play() calls also had the null argument. But you could just omit that call after the first time; you're calling in the reset action which would have the same effect? or is there then a delay between switching videos whilst the data already sent in is still being processed?

Previously, calling "play(null)" on a netstream which was already playing would just have reset/orphaned everything and set up a new playback pipeline. So there's not a huge difference between that and creating a new NetStream object. But we can add back in the capability, with that security check to ensure it's not being switched between different modes...

from adobe-runtime-support.

ajwfrost avatar ajwfrost commented on June 2, 2024

Ah - I just checked the code, and this is actually already what it's trying to do. But the check for if the argument is "null" is failing because we're checking that after a string conversion and the object itself then comes out as a non-null object (containing a string with contents "null"!!) -> switching the check here to null-check the original argument, rather than the stringified version...

thanks

from adobe-runtime-support.

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.