-
Notifications
You must be signed in to change notification settings - Fork 0
MUXに送信するパラメータを追加 #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MUXに送信するパラメータを追加 #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new viewerPlanStatus parameter to MUX configuration to track viewing plans (OneTimePlan or SubscriptionPlan). The Android implementation migrates from ExoPlayer2 to Media3 and updates the MUX SDK accordingly, while iOS only requires a package version update.
- Adds
viewerPlanStatusparameter to MUX configuration across all platform interfaces - Migrates Android video player from ExoPlayer2 to Media3 with updated MUX SDK
- Updates iOS MUX Stats dependency to version 4.0
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
video_player_platform_interface.dart |
Adds viewerPlanStatus field to MuxConfig class |
video_player_avfoundation/pigeons/messages.dart |
Adds viewerPlanStatus to MuxConfigMessage pigeon definition |
video_player_avfoundation/lib/src/messages.g.dart |
Generated pigeon code updates for new field |
video_player_avfoundation/lib/src/avfoundation_video_player.dart |
Maps viewerPlanStatus to MUX message |
video_player_avfoundation/ios/video_player_avfoundation.podspec |
Updates MUX Stats dependency to 4.0 |
| iOS native files | Updates pigeon-generated code and implements MUX viewer data |
| Android files | Comprehensive migration from ExoPlayer2 to Media3 with MUX SDK updates |
|
|
||
| if (arg.getVideoCdn() != null) | ||
| videoData.setVideoCdn(arg.getVideoCdn()); | ||
| // deprecatedになったが、iOS版との統一のために残しておく |
Copilot
AI
Aug 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The comment contains mixed languages (Japanese and English). Consider using consistent language in comments for better code maintainability.
| // deprecatedになったが、iOS版との統一のために残しておく | |
| // This is deprecated, but kept for consistency with the iOS version. |
| PendingIntent sessionActivity = buildSessionActivityPendingIntent(context); | ||
|
|
||
| MediaSession.Builder builder = new MediaSession.Builder(context, exoPlayer).setId("VideoPlayer"); | ||
| if(sessionActivity != null){ |
Copilot
AI
Aug 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after if keyword. Should be if (sessionActivity != null) { to follow Java formatting conventions.
| if(sessionActivity != null){ | |
| if (sessionActivity != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
| PlaybackSpeedMessage pigeonResult = new PlaybackSpeedMessage(); | ||
| Object textureId = list.get(0); | ||
| pigeonResult.setTextureId((textureId == null) ? null : ((textureId instanceof Integer) ? (Integer) textureId : (Long) textureId)); | ||
| pigeonResult.setTextureId( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| wrapped.add(0, null); | ||
| } | ||
| catch (Throwable exception) { | ||
| } catch (Throwable exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他の箇所もlint崩れてるので直してください
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一通り直しました
これで大丈夫だと思います
|
この変更は以降スクリプトによるものですか?
これはどの部分がそうですか? |
MUXに送信するパラメータに
viewerPlanStatusを追加し、視聴プラン(OneTimePlanorSubscriptionPlan)を記録できるようにしたhttps://linear.app/glucose/issue/SRS-576
App側の修正:https://github.com/glucoseinc/shirasu-app/pull/408
Android側は、
mux-stats-sdk-exoplayerからは送れなかったので、mux-stats-sdk-media3に移行した。それに伴い、exoplayer2からmedia3に移行した。
補足として、下記のように移行が推奨されていたのでいずれ必要なことではあった。
media3への移行作業は
flutter-packagesのフォーク元が既に対応していたので取り込むことで対応した。その後、弊社の独自拡張分を手作業で修正した。
具体的な手順は以下。
この取り込み作業のコミット:chore: exoplayerからmedia3に移行
f06b94fこの手順のあと、
viewer_plan_statusを送信するコードを追加した。MUXのパッケージ更新に伴い、
videoData.setVideoCdnがdeprecatedになっていたので削除した。iOS側はパッケージのバージョンアップ以外の作業は不要だった。