diff options
| author | Factiven <[email protected]> | 2023-08-09 15:11:53 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-09 15:11:53 +0700 |
| commit | bae1f53877c3447d3ba940f823e5a8a097f5b22c (patch) | |
| tree | 98abb195bcad6f3e6c61c76c62fc238f227b0ead /lib/Artplayer.js | |
| parent | Update package-lock.json (diff) | |
| download | moopa-bae1f53877c3447d3ba940f823e5a8a097f5b22c.tar.xz moopa-bae1f53877c3447d3ba940f823e5a8a097f5b22c.zip | |
Update v3.9.0 - Merged Beta to Main (#41)v3.9.0
* initial commit
* Update_v.3.6.7-beta-v1.2
* Update_v.3.6.7-beta-v1.3
* Update_v.3.6.7-beta-v1.3
> update API
* Fixed mediaList won't update
* added .env disqus shortname
* Update_v3.6.7-beta-v1.4
>Implementing database
* Create main.yml
* Update v3.6.7-beta-v1.5
small patch
* title home page
* Update content.js
* Delete db-test.js
* Update content.js
* Update home page card
* Update v3.7.0
* Update v3.7.1-beta
> migrating backend to main code
> fixed schedule component
* Update v3.8.0
> Added dub options
> Moved schedule backend
* Update v.3.8.1
> Fixed episodes on watch page isn't dubbed
* Update v3.8.1-patch-1
* Update v3.8.1-patch-2
> Another patch for dub
* Update v3.8.2
> Removed prisma configuration for database since it's not stable yet
* Update v3.8.3
> Fixed different provider have same id
* Update v.3.8.3
> Fixed player bug where the controls won't hide after updating anilist progress
* Update v3.8.4-patch-2
* Update v3.8.5
> Update readme.md
> Update .env.example
* Update next.config.js
* small adjusment info page
* Update v3.8.6
> Minor update for Android 13 user
* Update v3.8.7
> Added prev and next button to mediaSession
* Update v3.8.7-beta-v2
* Beta v2 (#37)
* Update schema.prisma
* Update schema.prisma
* Update schema.prisma
* Update 3.9.0-beta-v2.1
> Implemented database for storing user Watch List and settings
> Added buttons to auto-play next episodes
* Update v3.9.0-beta-v2.2
* Update README.md
---------
Co-authored-by: Chitraksh Maheshwari <[email protected]>
Diffstat (limited to 'lib/Artplayer.js')
| -rw-r--r-- | lib/Artplayer.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Artplayer.js b/lib/Artplayer.js index 94ceff1..96afe2b 100644 --- a/lib/Artplayer.js +++ b/lib/Artplayer.js @@ -13,9 +13,17 @@ export default function Player({ getInstance, id, track, + // socket + socket, + isPlay, + watchdata, + room, + autoplay, + setautoplay, ...rest }) { const artRef = useRef(); + const router = useRouter(); function playM3u8(video, url, art) { @@ -70,6 +78,17 @@ export default function Player({ }, ], settings: [ + { + html: "Autoplay", + // icon: '<img width="22" heigth="22" src="/assets/img/state.svg">', + tooltip: "ON/OFF", + switch: localStorage.getItem("autoplay") === "true" ? true : false, + onSwitch: function (item) { + setautoplay(!item.switch); + localStorage.setItem("autoplay", !item.switch); + return !item.switch; + }, + }, provider === "zoro" && { html: "Subtitles", icon: '<svg xmlns="http://www.w3.org/2000/svg" width="35" height="28" viewBox="0 -960 960 960"><path d="M240-350h360v-60H240v60zm420 0h60v-60h-60v60zM240-470h60v-60h-60v60zm120 0h360v-60H360v60zM140-160q-24 0-42-18t-18-42v-520q0-24 18-42t42-18h680q24 0 42 18t18 42v520q0 24-18 42t-42 18H140zm0-60h680v-520H140v520zm0 0v-520 520z"></path></svg>', |