Skip to content

[フォトアルバム]動画の再生を一覧画面か詳細画面を選べるようにしました。#2308

Merged
gakigaki merged 3 commits intomasterfrom
PhotoAlbumAddDetail
Dec 25, 2025
Merged

[フォトアルバム]動画の再生を一覧画面か詳細画面を選べるようにしました。#2308
gakigaki merged 3 commits intomasterfrom
PhotoAlbumAddDetail

Conversation

@nagasheep
Copy link
Contributor

@nagasheep nagasheep commented Nov 27, 2025

概要

iPhoneの使用時に、通信環境の良くないところでは、動画が多数あると再生できずに、数が少ないと再生できる現象を経験しています。 そのため、一覧画面で再生できるパターンと詳細画面でひとつずつ再生できるパターンを設定できるようにしました。

レビュー完了希望日

関連Pull requests/Issues

参考

DB変更の有無

無し

チェックリスト

iPhoneの使用時に、通信環境の良くないところでは、動画が多数あると再生できずに、数が少ないと再生できる現象を経験しています。
そのため、一覧画面で再生できるパターンと詳細画面でひとつずつ再生できるパターンを設定できるようにしました。
@nagasheep
Copy link
Contributor Author

表示設定の画面です。
「動画の再生形式」として、一覧で再生するか、一覧はサムネイル画像のみで詳細画面で再生するか、選択できます。
また、動画ごとに説明を書けるのですが、長い説明になる場合、一覧にも詳細にも同じものを表示するのは良い表示ではないと考え、「詳細画面がある場合の一覧での説明表示文字数」として、一覧での文字数を指定できるようにしました。
image

@nagasheep
Copy link
Contributor Author

詳細画面を使わない場合。
いままでと変わりないです。
image

@nagasheep
Copy link
Contributor Author

「一覧はサムネイル画像のみで詳細画面で再生する」パターンの一覧での動画の画面。
一覧ではサムネイル(動画のポスター画像)が表示されて、画像とタイトルから詳細画面にリンクします。
image

@nagasheep
Copy link
Contributor Author

「一覧はサムネイル画像のみで詳細画面で再生する」の場合の動画の詳細画面
この場合は、埋め込みコードを表示するにしていた場合、埋め込みコードは詳細画面に表示されることになります。
image

Copy link
Contributor

@gakigaki gakigaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応ありがとうございます。
動画がたくさんあるフォトアルバムだと、とても有効な表示形式だと思います。

コメントを参照の上、ご対応をお願いします。

*/
public function detail($request, $page_id, $frame_id, $photoalbum_content_id)
{
// 対象のデータを取得して詳細画面を表示する。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detail() で PhotoalbumContent::find() 結果の存在チェックやバケツ一致確認がありません。
存在しない/他アルバムのIDを指定すると 500 になるか、別アルバムの動画がこのフレームで再生・パンくず表示されます。
index() と同様にバケツの確認をし、さらにコンテンツの存在確認、見つからなければ 404リダイレクトする必要があります。

/**
* 表示する・表示しない区分
*/
final class PhotoalbumPlayviewType extends EnumsBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このクラスがどこからも参照されておらず、ラジオの値はリテラル値 0/1 になっています。
未使用なら削除するか、ラジオのラベルと値で利用するかして、混乱を避けたいです。

<label class="custom-control-label"
for="{{ "play_view_1" }}"
id="{{ "label_play_view_1" }}">
一覧はサムネイル画像のみで詳細画面で再生する
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「一覧」の対になるので、「詳細画面で再生する」で十分伝わると思います。


{{-- 詳細画面がある場合の一覧での説明表示文字数 --}}
<div class="form-group row">
<label class="{{$frame->getSettingLabelClass(true)}}">{{PhotoalbumFrameConfig::enum[PhotoalbumFrameConfig::description_list_length]}}</label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

画像のようにすると、より項目の意味合いが伝わりやすくなると思います。
また、「詳細画面で再生する」の場合のみ、文字数の項目を活性化するとより親切なUIになるかと思います。

@gakigaki gakigaki merged commit 8560ad2 into master Dec 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants