Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .circleci/config.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches: [master, main]
pull_request:

jobs:
test-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

# ubuntu-latest ships Google Chrome and a matching ChromeDriver; expose
# the driver on PATH so selenium (pinned <=4.2.0, no Selenium Manager)
# can find it.
- name: Put ChromeDriver on PATH
run: echo "$CHROMEWEBDRIVER" >> "$GITHUB_PATH"

- name: Install Python dependencies
run: pip install -r requirements-dev.txt

- name: Lint with flake8
run: npm run lint

- name: Build package
run: |
npm install
npm run build

- name: Run tests
run: npm run test -- --headless

- name: Run tests using React 18
run: npm run test -- --headless
env:
REACT_VERSION: 18.2.0
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Changes to `dash-player` were sponsored by Volkswagen's Center of Excellence for

---

## [Unreleased]

## Fixed

- [#74](https://github.com/plotly/dash-player/issues/74) Fixed video player throwing errors on unmount
- Updated dependencies and outdated react syntax to eliminate development environment issues

## [1.1.0] - 2023-03-16

## Changed
Expand Down
54 changes: 46 additions & 8 deletions dash_player/DashPlayer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# AUTO GENERATED FILE - DO NOT EDIT

import typing # noqa: F401
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
from dash.development.base_component import Component, _explicitize_args
try:
from dash.types import NumberType # noqa: F401
except ImportError:
# Backwards compatibility for dash<=4.1.0
if typing.TYPE_CHECKING:
raise
NumberType = typing.Union[ # noqa: F401
typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
]

ComponentSingleType = typing.Union[str, int, float, Component, None]
ComponentType = typing.Union[
ComponentSingleType,
typing.Sequence[ComponentSingleType],
]


class DashPlayer(Component):
Expand Down Expand Up @@ -68,11 +85,6 @@ class DashPlayer(Component):
Seek to the given number of seconds, or fraction if amount is
between 0 and 1.

- style (dict; optional):
Optional additional CSS styles. If width or height are supplied
within style, then this will override the component-level width or
height.

- url (string; optional):
The url of the media to be played.

Expand All @@ -82,12 +94,36 @@ class DashPlayer(Component):

- width (string; default '640px'):
A number or string representing the pixel width of the player."""
_children_props = []
_children_props: typing.List[str] = []
_base_nodes = ['children']
_namespace = 'dash_player'
_type = 'DashPlayer'
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, url=Component.UNDEFINED, playing=Component.UNDEFINED, loop=Component.UNDEFINED, controls=Component.UNDEFINED, volume=Component.UNDEFINED, muted=Component.UNDEFINED, playbackRate=Component.UNDEFINED, width=Component.UNDEFINED, height=Component.UNDEFINED, style=Component.UNDEFINED, playsinline=Component.UNDEFINED, currentTime=Component.UNDEFINED, secondsLoaded=Component.UNDEFINED, duration=Component.UNDEFINED, intervalCurrentTime=Component.UNDEFINED, intervalSecondsLoaded=Component.UNDEFINED, intervalDuration=Component.UNDEFINED, seekTo=Component.UNDEFINED, **kwargs):


def __init__(
self,
id: typing.Optional[typing.Union[str, dict]] = None,
className: typing.Optional[str] = None,
url: typing.Optional[str] = None,
playing: typing.Optional[bool] = None,
loop: typing.Optional[bool] = None,
controls: typing.Optional[bool] = None,
volume: typing.Optional[NumberType] = None,
muted: typing.Optional[bool] = None,
playbackRate: typing.Optional[NumberType] = None,
width: typing.Optional[str] = None,
height: typing.Optional[str] = None,
style: typing.Optional[typing.Any] = None,
playsinline: typing.Optional[bool] = None,
currentTime: typing.Optional[NumberType] = None,
secondsLoaded: typing.Optional[NumberType] = None,
duration: typing.Optional[NumberType] = None,
intervalCurrentTime: typing.Optional[NumberType] = None,
intervalSecondsLoaded: typing.Optional[NumberType] = None,
intervalDuration: typing.Optional[NumberType] = None,
seekTo: typing.Optional[NumberType] = None,
**kwargs
):
self._prop_names = ['id', 'className', 'controls', 'currentTime', 'duration', 'height', 'intervalCurrentTime', 'intervalDuration', 'intervalSecondsLoaded', 'loop', 'muted', 'playbackRate', 'playing', 'playsinline', 'secondsLoaded', 'seekTo', 'style', 'url', 'volume', 'width']
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'className', 'controls', 'currentTime', 'duration', 'height', 'intervalCurrentTime', 'intervalDuration', 'intervalSecondsLoaded', 'loop', 'muted', 'playbackRate', 'playing', 'playsinline', 'secondsLoaded', 'seekTo', 'style', 'url', 'volume', 'width']
Expand All @@ -98,3 +134,5 @@ def __init__(self, id=Component.UNDEFINED, className=Component.UNDEFINED, url=Co
args = {k: _locals[k] for k in _explicit_args}

super(DashPlayer, self).__init__(**args)

setattr(DashPlayer, "__init__", _explicitize_args(DashPlayer.__init__))
2 changes: 1 addition & 1 deletion dash_player/async-dashplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_player/async-dashplayer.js.map

Large diffs are not rendered by default.

Loading
Loading