Skip to content

Commit

Permalink
fix(changeQuality): keep playing
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Mar 29, 2024
1 parent a683918 commit 200d1f0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## UnRelease

## [1.2.34-beta.1]

- fix(changeQuality): keep playing

## [1.2.34-beta.0]

- fix index.ui.js
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oplayer/core",
"version": "1.2.34-beta.0",
"version": "1.2.34-beta.1",
"description": "Oh! Another HTML5 video player.",
"type": "module",
"main": "./dist/index.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ export class Player<Context extends Record<string, any> = Record<string, any>> {
) {
return new Promise<void>((resolve, reject) => {
if (this.isSourceChanging) return reject(Error('Previous Source is Changing.'))
const { isPlaying, currentTime, volume, playbackRate } = this

this.pause()
this.hasError = false
this.isSourceChanging = true
this.emit(options.preEvent, sourceLike)

const { isPlaying, currentTime, volume, playbackRate } = this
const { keepPlaying, keepTime } = options
const isPreloadNone = this.options.preload == 'none'
const canplay = isPreloadNone ? 'loadstart' : 'loadedmetadata'
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/build-plugins.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import path from 'path'
import fs from 'node:fs'
import path from 'node:path'
import { build } from 'vite'
import { globSync } from 'glob'
import chokidar from 'chokidar'
Expand All @@ -16,7 +16,7 @@ const globals = {
async function buildPlugin(name, dev) {
const { version, description, author, homepage } = JSON.parse(fs.readFileSync(`package.json`, 'utf-8'))
const outfileName = name
const pluginName = name=='index'?'@oplayer/plugins':`@oplayer/${outfileName}`
const pluginName = name == 'index' ? '@oplayer/plugins' : `@oplayer/${outfileName}`
const now = Date.now()
console.log(`👾 Start built ${pluginName} ··· `)

Expand Down
4 changes: 4 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## UnRelease

## [1.3.0-beta.1]

- fix index.ui banner

## [1.3.0]

- beta and alpha
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oplayer/ui",
"version": "1.3.0-beta.0",
"version": "1.3.0-beta.1",
"description": "ui plugin for oplayer",
"type": "module",
"main": "./dist/index.es.js",
Expand Down

0 comments on commit 200d1f0

Please sign in to comment.