Skip to content

Conversation

@Dinnerbone
Copy link
Contributor

Bikeshedding time, here's the chance to decide what the "v1 api" looks like before we lock it in.

The only change so far is that I've added a specific method for calling EI, vs the very easy-to-break and implicit "the method will exist, trust me". I'm awaiting feedback before touching anything else.

Whilst this is "version 1" (PlayerV1 interface), if we never add a V2 that's totally fine. ruffle() is the same as ruffle(1).

Things to consider for each existing member of the API:

  • Is anything a property that should be a method?
  • Is anything a method that should be a property?
  • Should we rename anything, or change arguments?

@Dinnerbone Dinnerbone added A-web Area: Web & Extensions T-feature Type: New Feature (that Flash doesn't have) labels Sep 15, 2024
@Dinnerbone
Copy link
Contributor Author

I've gone ahead and changed pause()/play()/isPlaying to suspend()/resume()/suspended as that seems fairly agreed upon. Comment if anyone disagrees with the specifics before this PR is finished.

@Dinnerbone
Copy link
Contributor Author

Renamed enterFullscreen to requestFullscreen, and removed setFullscreen.
Decided to keep fullscreenEnabled as if we still support old ios, it's likely users will forget to check the prefixed stuff too.

@Dinnerbone
Copy link
Contributor Author

Changed onFSCommand (getter/setter) to addFSCommandHandler (method).

@Dinnerbone

This comment was marked as outdated.

@Dinnerbone Dinnerbone marked this pull request as ready for review October 26, 2024 18:04
@Dinnerbone Dinnerbone force-pushed the v1 branch 2 times, most recently from 0231cea to b02a20d Compare November 16, 2024 19:16
@Dinnerbone Dinnerbone merged commit 114d24f into ruffle-rs:master Nov 16, 2024
22 checks passed
PrivateGER pushed a commit to PrivateGER/Sharkey that referenced this pull request Dec 9, 2024
These can be replaced later when Ruffle API v1 releases with proper TypeScript definitions and such: ruffle-rs/ruffle#17939
I am planning to do so myself when that happens.
For now, Dinnerbone has graciously provided us with type definitions of the current API.

Co-authored-by: Nathan Adams <dinnerbone@dinnerbone.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-web Area: Web & Extensions newsworthy T-feature Type: New Feature (that Flash doesn't have)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants