Skip to content

Commit

Permalink
Merge branch 'release/2024.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Nov 29, 2024
2 parents 3831864 + d52626e commit 16d168f
Show file tree
Hide file tree
Showing 139 changed files with 2,125 additions and 1,736 deletions.
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
NEXT_PUBLIC_REDUX_LOGGER=false
NEXT_PUBLIC_SORA_SIGNALING_URL=ws://localhost:5000/signaling
NEXT_PUBLIC_E2EE_WASM_URL=https://sora-e2ee-wasm.shiguredo.app/2020.2/wasm.wasm
NEXT_PUBLIC_LIGHT_ADJUSTMENT_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/light-adjustment@latest/dist
NEXT_PUBLIC_VIRTUAL_BACKGROUND_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/virtual-background@latest/dist
NEXT_PUBLIC_NOISE_SUPPRESSION_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/noise-suppression@latest/dist
1 change: 0 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
NEXT_PUBLIC_REDUX_LOGGER=true
NEXT_PUBLIC_SORA_SIGNALING_URL=ws://localhost:5000/signaling
NEXT_PUBLIC_E2EE_WASM_URL=/wasm.wasm
NEXT_PUBLIC_LIGHT_ADJUSTMENT_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/light-adjustment@latest/dist
NEXT_PUBLIC_VIRTUAL_BACKGROUND_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/virtual-background@latest/dist
NEXT_PUBLIC_NOISE_SUPPRESSION_ASSETS_PATH=https://cdn.jsdelivr.net/npm/@shiguredo/noise-suppression@latest/dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [20, 22]
steps:
- uses: actions/checkout@v4
- name: Node.js ${{ matrix.node-version }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy sora-devtools to Pages

on:
push:
branches: ["develop", "feature/github-pages"]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- uses: pnpm/action-setup@v4
# - uses: actions/configure-pages@v5
# with:
# static_site_generator: next
- run: pnpm install
- run: pnpm run build
- uses: actions/upload-pages-artifact@v3
with:
path: ./dist

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
61 changes: 54 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,56 @@

## develop

## 2024.2.0

**リリース日**: 2024-11-29

- [CHANGE] JSON を入力する欄に機能を追加する
- 対象の項目は以下
- `metadata`
- `signalingNotifyMetadata`
- `forwardingFilters`
- `forwardingFilter`
- `dataChannels`
- `videoVP9Params`
- `videoAV1Params`
- `videoH264Params`
- `videoH265Params`
- JSON の整形を行う `pretty format` ボタンを追加する
- 入力値が JSON として正しい時に有効になる
- 入力内容が JSON として正しくない場合に入力欄の枠線を赤くする
- @tnamao
- [CHANGE] audioBitRate と videoBitRate を自由に設定できるようにする
- 自由入力にし、選択肢以外のビットレートでも Sora の接続パラメータとして使用できるようにする
- @tnamao
- [CHANGE] index ページのサイマルキャストのリンクのうち `resolution` の値の指定に誤りがあったので修正する
- `720p (1280x720)` を解像度のみの `1280x720` に修正する
- @tnamao
- [UPDATE] sora-js-sdk のバージョンを 2024.2.0 に上げる
- @voluntas
- [ADD] Devtools の初期化処理に Service Worker の登録解除処理を追加する
- 以前 Sora Devtools 内で使用していた Service Worker の登録を解除するため
- @tnamao
- [ADD] forwardingFilters の入力項目を新規追加する
- 既存の forwardingFilter も残しており、両方設定した場合はシグナリング時に両方のパラメータを送信する
- @tnamao
- [ADD] mediaType に mp4Media を追加する
- 指定された H.264 + Opus の MP4 ファイルからメディアストリームを取得して配信できるようにするもの
- ファイルの終端に達した場合には、先頭に戻って繰り返し再生する
- 制限:
- Chrome / Edge のみで利用可能
- B フレームを含んだ H.264 は正常に再生できない
- @sile
- [ADD] @shiguredo/mp4-media-stream (2024.2.0) を依存パッケージに追加する
- @sile
- [ADD] 音声ビットレートの選択肢に 384 kbps を追加する
- @blaue-fuchs

### misc

## 2024.1.6

**2024-07-09**
**リリース日**: 2024-07-09

- [FIX] sora-js-sdk のバージョンを 2024.1.2 に上げる
- @voluntas
Expand All @@ -23,7 +70,7 @@

## 2024.1.5

**2024-06-20**
**リリース日**: 2024-06-20

- [FIX] 映像のオーバーレイ表示の `z-index` を調整する
- @tnamao
Expand All @@ -32,37 +79,37 @@

## 2024.1.4

**2024-06-17**
**リリース日**: 2024-06-17

- [FIX] LocalVideo のスポットライトフォーカス時の表示を修正する
- CSS クラスの指定が正しくなかった
- @tnamao

## 2024.1.3

**2024-06-17**
**リリース日**: 2024-06-17

- [FIX] リリースミスを修正する
- @voluntas

## 2024.1.2

**2024-06-17**
**リリース日**: 2024-06-17

- [FIX] sora-js-sdk のバージョンを 2024.1.1 に上げる
- @voluntas

## 2024.1.1

**2024-06-10**
**リリース日**: 2024-06-10

- [FIX] サイマルキャスト時の Media Stats の表示ができない問題を修正する
- rid 毎に切り替え可能にする
- @tnamao

## 2024.1.0

**2024-06-07**
**リリース日**: 2024-06-07

- [UPDATE] sora-js-sdk のバージョンを 2024.1.0 に上げる
- @voluntas
Expand Down
4 changes: 0 additions & 4 deletions DOCUMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ r2: 通常の解像度のままエンコード

映像のビットレートを指定します。

## e2ee

E2EE(End-to-End Encryption) を使用するかどうかを指定します。

## reconnect

切断時に再接続するかどうかを指定します。
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ Sora の配信、視聴機能が一通り確認できるようになっていま
## 利用技術

- [WebRTC SFU Sora JavaScript SDK](https://github.com/shiguredo/sora-js-sdk)
- [Node\.js](https://nodejs.org/en)
- [Next\.js](https://nextjs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [React](https://reactjs.org/)
- [Redux](https://redux.js.org/)
- [Redux Toolkit](https://redux-toolkit.js.org/)
- [Bootstrap](https://getbootstrap.com/)
- [React Bootstrap \| React Bootstrap](https://react-bootstrap.github.io/)
- [React Bootstrap](https://react-bootstrap.github.io/)
- [Media Processors](https://github.com/shiguredo/media-processors)
- [@shiguredo/virtual\-background \- npm](https://www.npmjs.com/package/@shiguredo/virtual-background)
- [@shiguredo/noise\-suppression \- npm](https://www.npmjs.com/package/@shiguredo/noise-suppression)
Expand Down
11 changes: 6 additions & 5 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
},
Expand All @@ -8,16 +8,17 @@
"rules": {
"all": true,
"suspicious": {
"noExplicitAny": "off"
"noExplicitAny": "off",
// React 利用しているので off
"noReactSpecificProps": "off"
},
"style": {
// snake_case にしたいので off
"useNamingConvention": "off",
// default export を使いたいので off
"noDefaultExport": "off",
"useFilenamingConvention": "off"
},
"nursery": {
"noUndeclaredDependencies": "off"
},
"complexity": {
"useSimplifiedLogicExpression": "off",
"noExcessiveCognitiveComplexity": "off"
Expand Down
139 changes: 139 additions & 0 deletions canary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import argparse
import re
import subprocess
from typing import Optional


# ファイルを読み込み、バージョンを更新
def update_version(file_path: str, dry_run: bool) -> Optional[str]:
with open(file_path, "r", encoding="utf-8") as f:
content: str = f.read()

# 現在のバージョンを取得
current_version_match = re.search(r'"version"\s*:\s*"([\d\.\w-]+)"', content)
if not current_version_match:
raise ValueError("Version not found or incorrect format in package.json")

current_version: str = current_version_match.group(1)

# バージョンが -canary.X を持っている場合の更新
if "-canary." in current_version:
new_content, count = re.subn(
r'("version"\s*:\s*")(\d+\.\d+\.\d+-canary\.)(\d+)',
lambda m: f"{m.group(1)}{m.group(2)}{int(m.group(3)) + 1}",
content,
)
else:
# -canary.X がない場合、次のマイナーバージョンにして -canary.0 を追加
new_content, count = re.subn(
r'("version"\s*:\s*")(\d+)\.(\d+)\.(\d+)',
lambda m: f"{m.group(1)}{m.group(2)}.{int(m.group(3)) + 1}.0-canary.0",
content,
)

if count == 0:
raise ValueError("Version not found or incorrect format in package.json")

# 新しいバージョンを確認
new_version_match = re.search(r'"version"\s*:\s*"([\d\.\w-]+)"', new_content)
if not new_version_match:
raise ValueError("Failed to extract the new version after the update.")

new_version: str = new_version_match.group(1)

print(f"Current version: {current_version}")
print(f"New version: {new_version}")
confirmation: str = (
input("Do you want to update the version? (Y/n): ").strip().lower()
)

if confirmation != "y":
print("Version update canceled.")
return None

# Dry-run 時の動作
if dry_run:
print("Dry-run: Version would be updated to:")
print(new_content)
else:
with open(file_path, "w", encoding="utf-8") as f:
f.write(new_content)
print(f"Version updated in package.json to {new_version}")

return new_version


# pnpm install & pnpm build 実行
def run_pnpm_operations(dry_run: bool) -> None:
if dry_run:
print("Dry-run: Would run 'pnpm run dist'")
else:
subprocess.run(["pnpm", "run", "dist"], check=True)
print("pnpm run dist executed")


# git コミット、タグ、プッシュを実行
def git_commit_version(new_version: str, dry_run: bool) -> None:
if dry_run:
print("Dry-run: Would run 'git add package.json'")
print(f"Dry-run: Would run '[canary] Bump version to {new_version}'")
else:
subprocess.run(["git", "add", "package.json"], check=True)
subprocess.run(
["git", "commit", "-m", f"[canary] Bump version to {new_version}"],
check=True,
)
print(f"Version bumped and committed: {new_version}")


# git コミット、タグ、プッシュを実行
def git_operations_after_build(new_version: str, dry_run: bool) -> None:
if dry_run:
print("Dry-run: Would run 'git add dist/'")
print(f"Dry-run: Would run '[canary] Add dist files for {new_version}'")
print(f"Dry-run: Would run 'git tag {new_version}'")
print("Dry-run: Would run 'git push'")
print(f"Dry-run: Would run 'git push origin {new_version}'")
else:
subprocess.run(["git", "add", "dist/"], check=True)
subprocess.run(
["git", "commit", "-m", f"[canary] Add dist files for {new_version}"],
check=True,
)
subprocess.run(["git", "tag", new_version], check=True)
subprocess.run(["git", "push"], check=True)
subprocess.run(["git", "push", "origin", new_version], check=True)


# メイン処理
def main() -> None:
parser = argparse.ArgumentParser(
description="Update package.json version, run pnpm install, build, and commit changes."
)
parser.add_argument(
"--dry-run",
action="store_true",
help="Run in dry-run mode without making actual changes",
)
args = parser.parse_args()

package_json_path: str = "package.json"

# バージョン更新
new_version: Optional[str] = update_version(package_json_path, args.dry_run)

if not new_version:
return # ユーザーが確認をキャンセルした場合、処理を中断

# バージョン更新後にまず git commit
git_commit_version(new_version, args.dry_run)

# pnpm install & build 実行
run_pnpm_operations(args.dry_run)

# ビルド後のファイルを git commit, タグ付け、プッシュ
git_operations_after_build(new_version, args.dry_run)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion dist/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/eb7d75aaf9aae9d7.css" as="style"/><link rel="stylesheet" href="/_next/static/css/eb7d75aaf9aae9d7.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-a432cf42cf045819.js" defer=""></script><script src="/_next/static/chunks/framework-4ed78fcefec7e84d.js" defer=""></script><script src="/_next/static/chunks/main-276b825106a04641.js" defer=""></script><script src="/_next/static/chunks/pages/_app-350942015c635c5c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-0e8428b30c6c0304.js" defer=""></script><script src="/_next/static/sora_devtools/_buildManifest.js" defer=""></script><script src="/_next/static/sora_devtools/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"sora_devtools","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">404: This page could not be found</title><link rel="preload" href="/_next/static/css/8e274babe325500e.css" as="style"/><link rel="stylesheet" href="/_next/static/css/8e274babe325500e.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-256290675aa7520d.js" defer=""></script><script src="/_next/static/chunks/framework-18714c6b85fd6b0c.js" defer=""></script><script src="/_next/static/chunks/main-95d54ce5e9d327f8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-c66f1e45f07c050d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c62151a4dbbb9ed1.js" defer=""></script><script src="/_next/static/sora_devtools/_buildManifest.js" defer=""></script><script src="/_next/static/sora_devtools/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"sora_devtools","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1 change: 0 additions & 1 deletion dist/_next/static/chunks/3014b548-3d757d63f1e501e2.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/_next/static/chunks/5bc2402c-caef079c4e93de73.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions dist/_next/static/chunks/724-8c8e5c7dff506555.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/_next/static/chunks/764-e923497c56bbf81a.js

This file was deleted.

4 changes: 4 additions & 0 deletions dist/_next/static/chunks/781-2709d268dda874d8.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/_next/static/chunks/809-172bb4a9e6e4a988.js

Large diffs are not rendered by default.

Loading

0 comments on commit 16d168f

Please sign in to comment.