Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jan 6, 2025
1 parent 0c72c9d commit 729a2d0
Show file tree
Hide file tree
Showing 13 changed files with 434 additions and 459 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
name: Compressed Size

env:
NODE_OPTIONS: --max-old-space-size=6144

on:
pull_request:
types:
- 'opened'
- 'synchronize'
paths-ignore:
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-compressed-size-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-compressed-size-
- uses: preactjs/compressed-size-action@v2
with:
build-script: 'build:packs'
repo-token: '${{ secrets.GIT_HUB_TOKEN }}'
pattern: './packages/*/{dist,compiled}/**/*.js'
# name: Compressed Size

# env:
# NODE_OPTIONS: --max-old-space-size=6144

# on:
# pull_request:
# types:
# - 'opened'
# - 'synchronize'
# paths-ignore:
# - '**/*.md'

# concurrency:
# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
# cancel-in-progress: true

# jobs:
# build:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v4

# - name: setup node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20.x

# - name: Install pnpm
# uses: pnpm/action-setup@v4
# with:
# version: latest
# run_install: false

# - name: Get pnpm store directory
# id: pnpm-cache
# run: |
# echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

# - uses: actions/cache@v4
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
# key: ${{ runner.os }}-pnpm-store-compressed-size-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-compressed-size-

# - uses: preactjs/compressed-size-action@v2
# with:
# build-script: 'build:packs'
# repo-token: '${{ secrets.GIT_HUB_TOKEN }}'
# pattern: './packages/*/{dist,compiled}/**/*.js'
6 changes: 3 additions & 3 deletions examples/standalone/helper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Player } from '@oplayer/core'
import { MenuBar } from '@oplayer/ui/src/types'
import { FORMAT_MENU } from './constants'
import { vttThumbnails, Ad } from '@oplayer/plugins'
import { vttThumbnails, ad } from '@oplayer/plugins'
import hls from '@oplayer/hls'

export const register = (player: Player) => {
Expand Down Expand Up @@ -35,14 +35,14 @@ export const register = (player: Player) => {
)

player.applyPlugin(
Ad({
ad({
autoplay: false,
image: 'http://5b0988e595225.cdn.sohucs.com/images/20190420/da316f8038b242c4b34f6db18b0418d4.gif',
// video: VIDEO_LIST[1],
duration: 10,
skipDuration: 5,
target: 'https://oplayer.vercel.app',
plugins: [hls({ qualityControl: false })],
plugins: [hls({ qualityControl: false })]
})
)
}
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.38-beta.0]

- add Farsi (fa) and Pashto (pa) locales for internationalization of controls (#147)

## [1.2.34-beta.1]

- fix(changeQuality): keep playing
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.37",
"version": "1.2.38-beta.0",
"description": "Oh! Another HTML5 video player.",
"type": "module",
"main": "./dist/index.es.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"@oplayer/torrent": "workspace:*",
"@oplayer/ui": "workspace:*",
"mdx-embed": "^1.1.2",
"next": "^14.2.18",
"next": "^14.2.22",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"sass": "^1.81.0"
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"sass": "^1.83.1"
}
}
6 changes: 3 additions & 3 deletions packages/docs/src/pages/docs/plugins/ad.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Ad
## ad

```jsx
import Player from '@oplayer/react'
import ui from '@oplayer/ui'
import { vttThumbnails } from '@oplayer/plugins'

OPlayer.make('#player').use([ui(),
Ad({
OPlayer.make('#player').use([ui(),
ad({
autoplay: false,
image: 'http://5b0988e595225.cdn.sohucs.com/images/20190420/da316f8038b242c4b34f6db18b0418d4.gif',
video: videoSource,
Expand Down
2 changes: 1 addition & 1 deletion packages/hls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
},
"devDependencies": {
"@oplayer/core": "workspace:*",
"hls.js": "^1.5.17"
"hls.js": "^1.5.18"
}
}
2 changes: 1 addition & 1 deletion packages/mpegts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
},
"devDependencies": {
"@oplayer/core": "workspace:*",
"mpegts.js": "^1.7.3"
"mpegts.js": "^1.8.0"
}
}
6 changes: 3 additions & 3 deletions packages/plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Chromecast from './src/chromecast'
import AirPlay from './src/airplay'
import vttThumbnails from './src/vttThumbnails'
import Playlist from './src/playlist'
import Ad from "./src/ad"

import ad from './src/ad'
import vttThumbnails from './src/vttThumbnails'

export { Chromecast, AirPlay, vttThumbnails, Playlist, Ad }
export { Chromecast, AirPlay, Playlist, ad, vttThumbnails }
4 changes: 2 additions & 2 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oplayer/plugins",
"version": "1.0.14",
"version": "1.0.15-beta.0",
"author": "shiyiya",
"description": "oplayer's plugin",
"homepage": "https://github.com/shiyiya/oplayer",
Expand All @@ -24,7 +24,7 @@
"devDependencies": {
"@oplayer/core": "workspace:*",
"@oplayer/ui": "workspace:*",
"@types/chromecast-caf-sender": "^1.0.10",
"@types/chromecast-caf-sender": "^1.0.11",
"chokidar": "^3.6.0",
"glob": "^10.4.5",
"m3u8-parser": "^7.2.0",
Expand Down
55 changes: 28 additions & 27 deletions packages/plugins/src/ad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const topRight = $.css({
right: '0.5em',
top: '0.5em',
'z-index': 1,
display: "flex",
gap: "5px",
"align-items": "center",
"justify-content": "center"
display: 'flex',
gap: '5px',
'align-items': 'center',
'justify-content': 'center'
})

const area = $.css(
Expand All @@ -32,13 +32,13 @@ const mute = $.css({

type Options = {
video?: string
image?: string,
position?:{
left?: string;
bottom?: string;
top?: string;
right?: string;
},
image?: string
position?: {
left?: string
bottom?: string
top?: string
right?: string
}
autoplay?: boolean
plugins?: PlayerPlugin[]
skipDuration?: number
Expand All @@ -60,7 +60,7 @@ export default ({
}: Options): PlayerPlugin => ({
name: 'oplayer-plugin-ad',
version: __VERSION__,
key:"Ad",
key: 'ad',
apply: (player) => {
if (autoplay) {
bootstrap()
Expand Down Expand Up @@ -95,17 +95,18 @@ export default ({
cursor: 'pointer'
})}`,
{},
`<div class=${position ?
$.css({
...position,
position: 'absolute',
'z-index': 1,
display: "flex",
gap: "5px",
"align-items": "center",
"justify-content": "center"
}) :
topRight
`<div class=${
position
? $.css({
...position,
position: 'absolute',
'z-index': 1,
display: 'flex',
gap: '5px',
'align-items': 'center',
'justify-content': 'center'
})
: topRight
}>
${
skipDuration
Expand All @@ -121,7 +122,7 @@ export default ({
${
video
? `
<div class='${area} ${mute}' volume>
<div class='${area} ${mute}' volume>
<svg width="1em" height="1.5em" viewBox="0 0 1024 1024" version="1.1">
<path d="M552.96 152.064v719.872c0 16.118-12.698 29.184-28.365 29.184a67.482 67.482 0 0 1-48.394-20.644L329.359 729.354a74.547 74.547 0 0 0-53.493-22.794H250.47c-104.386 0-189.03-87.101-189.03-194.56s84.644-194.56 189.03-194.56h25.396c20.07 0 39.3-8.192 53.473-22.794L476.18 143.503a67.482 67.482 0 0 1 48.436-20.623c15.646 0 28.344 13.066 28.344 29.184z m216.965 101.58a39.936 39.936 0 0 1 0-57.425 42.25 42.25 0 0 1 58.778 0c178.483 174.408 178.483 457.154 0 631.562a42.25 42.25 0 0 1-58.778 0 39.936 39.936 0 0 1 0-57.405 359.506 359.506 0 0 0 0-516.752zM666.542 373.884a39.731 39.731 0 0 1 0-55.235 37.52 37.52 0 0 1 53.944 0c104.305 106.783 104.305 279.921 0 386.704a37.52 37.52 0 0 1-53.944 0 39.731 39.731 0 0 1 0-55.235c74.486-76.288 74.486-199.946 0-276.234z" />
</svg>
Expand Down Expand Up @@ -149,9 +150,9 @@ export default ({
.create()

$volume!.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation(); // Prevent the click event from bubbling to the $container
e.preventDefault()
e.stopPropagation() // Prevent the click event from bubbling to the $container

instance.isMuted ? instance.unmute() : instance.mute()
$volume!.classList.toggle(mute)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"devDependencies": {
"@oplayer/core": "workspace:*",
"@types/react": "^18.3.12",
"@types/react": "^18.3.18",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
Loading

0 comments on commit 729a2d0

Please sign in to comment.