Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
iOSの動画アプリを作る上で押さえておきたい設計
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
h.crane
October 25, 2019
Technology
3
800
iOSの動画アプリを作る上で押さえておきたい設計
イベント「Tech Book Conference for iOS」で登壇した内容
https://techbookconference.connpass.com/event/148487/
h.crane
October 25, 2019
Tweet
Share
More Decks by h.crane
See All by h.crane
Personal Voice on iOS26
hcrane
0
160
iOSDJ2025 - Stream Deck Plugin using Swift
hcrane
0
1.8k
Getting started with controlling LEGO using Swift
hcrane
2
1.4k
Swift 5.9 と C++ の互換性
hcrane
1
900
Live on iOSDC2023
hcrane
4
1.5k
自販機で1000円を使い切りたいんじゃ!
hcrane
0
200
Vision.framework - 商品画像からのテキスト検出と並列化実装への試み
hcrane
1
880
DevRel/Japan 2023 - 1つの事業部だけで行う DevRel とは
hcrane
0
1.1k
R2-D2をiOSで動かす
hcrane
2
4.9k
Other Decks in Technology
See All in Technology
Vertex AI Agent Engine で学ぶ「記憶」の設計
tkikuchi
0
110
Master Dataグループ紹介資料
sansan33
PRO
1
4.4k
Windows ネットワークを再確認する
murachiakira
PRO
0
160
What's new in Go 1.26?
ciarana
2
250
バクラクにおける Document Understanding の挑戦:書類の「読取」から「意思決定」へ / document-understanding-in-bakuraku-2026
yuya4
0
150
AI Coding Agentの地殻変動 ~ ai-coding.info の定点観測 ~
kotauchisunsun
1
480
AIで 浮いた時間で 何をする? 2026春 #devsumi
konifar
16
3.4k
Claude Cowork Plugins を読む - Skills駆動型業務エージェント設計の実像と構造
knishioka
1
180
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
マイグレーションガイドに書いてないRiverpod 3移行話
taiju59
0
330
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
990
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
2.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
170
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
How STYLIGHT went responsive
nonsquared
100
6k
Practical Orchestrator
shlominoach
191
11k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Building the Perfect Custom Keyboard
takai
2
700
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
470
Transcript
iOSの動画アプリを作る上で 押さえておきたい設計 Hiromu Tsuruta
About me 〈Company〉 - every, inc. / DELISH KITCHEN 〈Role〉
- iOS Developer 〈Account〉 - Twitter: @hcrane14 - Qiita: H_Crane
動画のお話の前に、、、 AVFoundationの制約があるって知ってました?
AVFoundationが許可できる 動画の同時接続数(再生数)に上限が! → その数は16接続まで → iOS13から32接続まで増えた! (UIKitに限る、、?)
Demo TableViewで動画を保持したセルを表示させたテスト ここだけ 動画が出ていない! つまり32個までしか 接続できないことが わかった! セルを33個生成し動画を同時再生させた時 9/15なので Xcode
beta版 セルを17個生成し動画を同時再生させた時 ここだけ 動画が動いていない! つまり16個までしか 接続できない、、 はずだった笑
「え?32個も同時に接続することなどなくない?」 → 気づいていないだけで勝手に接続されてっぞ!
① 画面遷移で奥深く進む場合はスタックされる 参考 https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwi7x4GC8rPlAhULx4sBHcBAAzUQjhx6BAgBEAI&url=http%3A%2F%2Fharuna0503.xsrv.jp%2F2019%2F07 %2F04%2Fios-%25E7%2594%25BB%25E9%259D%25A2%25E9%2581%25B7%25E7%25A7%25BB%25E3%2581%25AE%25E7%25A8%25AE%25E9%25A1%259E%2F&psig=AOvVaw2OXL EayApH9Ad0tPInLYVy&ust=1571971474667862 画面遷移例
② 動画の広告は勝手にスタックされる 参考 https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjYkqbwoLLlAhXZc94KHZcYCL QQjhx6BAgBEAI&url=https%3A%2F%2Fwww.exchangewire.jp%2F2015%2F01%2F28%2Fnews-video-mobile%2F&psi g=AOvVaw0z9I5CcmN9FIFF3hFo1DrJ&ust=1571915808807843 参考 https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjWt8iYorLlAhWswosBHYXVDpgQjhx6BA gBEAI&url=https%3A%2F%2Fgmotech.jp%2Fnews_release%2F%3Fp%3D5121&psig=AOvVaw2RfpR8QLMvZox85TI8ikgm&ust =1571916082239556
動画リワード広告 複数の動画広告
どうやって動画の最適化すんの?
YoutubeのiOSアプリから動画最適化例を見る
動画の流れを分けてみてみると、、 検索 1回目 検索 2回目 検索 検索 動画 動画 閉じる
閉じる 動画のプレイヤーを 1つ保持 動画のプレイヤーを 使い回す
検索 検索 検索 検索 ・・・ 仕組みはシンプル 動画プレイヤー
動画のプレイヤーを管理して 制限しているだけ!
シングルトンで動画のプレイヤーを管理
RxSwift / Combine などを使用すると
https://booth.pm/ja/items/1567921 続きは 本で!
SwiftUIで動画を複数表示させた時 100個を同時に再生させても問題なかった! おまけ
謎は深まるばかり、、、 fin