<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rils_k</author_name>
  <author_url>https://blog.hatena.ne.jp/rils_k/</author_url>
  <blog_title>まだどこにもないアプリを作る</blog_title>
  <blog_url>https://rils-k.hatenablog.com/</blog_url>
  <categories>
    <anon>Swift</anon>
    <anon>Xcode</anon>
  </categories>
  <description>以下のコードをViewDidLoad内に置きます。 do { let audioSession: AVAudioSession = AVAudioSession.sharedInstance() try audioSession.setCategory(AVAudioSession.Category(rawValue: &quot;AVAudioSessionCategoryAmbient&quot;)) }catch{ print(&quot;エラー&quot;) } これで端末で音楽などが再生されていても アプリ内の音声や動画の音声が再生できるようになります。 こちらのサイト様を参考にさせていただきました teratail.co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frils-k.hatenablog.com%2Fentry%2F2022%2F01%2F24%2F123220&quot; title=&quot;swift AVPlayer・AVFoundationなどで音楽止めずに再生する - まだどこにもないアプリを作る&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-01-24 12:32:20</published>
  <title>swift AVPlayer・AVFoundationなどで音楽止めずに再生する</title>
  <type>rich</type>
  <url>https://rils-k.hatenablog.com/entry/2022/01/24/123220</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
