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

Total playtime on display is double of actual total playtime #132

Closed
murezzda opened this issue Apr 8, 2019 · 1 comment
Closed

Total playtime on display is double of actual total playtime #132

murezzda opened this issue Apr 8, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@murezzda
Copy link
Contributor

murezzda commented Apr 8, 2019

Describe the bug
The total playtime displayed in the player shows double the value of the actual playtime of the file.

bug_length_of_file

Expected behavior
The correct total playtime is shown.

@murezzda murezzda added the bug Something isn't working label Apr 8, 2019
@pietrop
Copy link
Contributor

pietrop commented Apr 8, 2019

Nicely spotted, thanks @murezzda !

I think I found it, it's onLoadedDataGetDuration in TranscriptEditor/index.js

  onLoadedDataGetDuration = e => {
    const currentDuration = e.target.duration;
    const currentDurationWithOffset =
      currentDuration + this.state.timecodeOffset;
    const durationInSeconds = secondsToTimecode(
-      currentDuration + currentDurationWithOffset
+     currentDurationWithOffset
    );

    this.setState({
      mediaDuration: durationInSeconds
    });

fixing in PR #135

pietrop pushed a commit that referenced this issue Apr 8, 2019
 playtime on display is double of actual total playtime
jamesdools pushed a commit that referenced this issue Apr 8, 2019
* got storybook working

tests not working yet

* fixed tests

using jest, and removed CRA dependency, updated babel config for babel 7 and stubbed css files for jest tests for css node modules

* Added support for demo app in storybook

* fixed eslint

CRA had it's own linter internally, so added linting + dependencies

* cleaned up export scripts in package.json

* updated README

* finalised refactor

see PR description for more details

* rename demo app editor to demoTranscript

* bringing back style lint, and fixing lint in storybook config

* updated with current master AWS adapter

* linting

* fix #132 playtime displaied double

 playtime on display is double of actual total playtime

* temporary fix #73 monospace duration and current time

 in media player to stop moving while playing
@pietrop pietrop closed this as completed Apr 8, 2019
pietrop added a commit that referenced this issue Apr 8, 2019
* Task: added lerna

* WIP: storybook conversion

* mend

* WIP: adding MediaPlayer

* move TimedTextEditor, TranscriptEditor and adapters util to packages (#128)

* moved TimedTextEditor and TranscriptEditor to packages

also created stories, and package.json for each, but can't test them in storybook coz they have dependencies on adapters in Util folder

* moved Util and demdemo app

* got storybook working

* added demo app to storybook

* mend

* Fix: commenting out demo

* Changed repo packages folder structure (#129)

* cleaned up adapters

* changed folder structure

* fixed timecode converter duplice module

* made all packages private except for TranscriptEditor

* working

* "Monorepo" refactor spike remove lerna (#135)

* got storybook working

tests not working yet

* fixed tests

using jest, and removed CRA dependency, updated babel config for babel 7 and stubbed css files for jest tests for css node modules

* Added support for demo app in storybook

* fixed eslint

CRA had it's own linter internally, so added linting + dependencies

* cleaned up export scripts in package.json

* updated README

* finalised refactor

see PR description for more details

* rename demo app editor to demoTranscript

* bringing back style lint, and fixing lint in storybook config

* updated with current master AWS adapter

* linting

* fix #132 playtime displaied double

 playtime on display is double of actual total playtime

* temporary fix #73 monospace duration and current time

 in media player to stop moving while playing

* Feature: Added custom css loading to storybook (#136)

* Resolved conflict iwth AWS adapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants