# Webview: Background video not working, video auto-plays fullscreen on iOS

**URL:** https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [June 29, 2021, 7:25pm UTC](https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453 "2021-06-29T19:25:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pewu](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pewu/32/109466_2.png) [@pewu](https://community.thunkable.com/u/pewu)
#### Post date: [June 29, 2021, 7:25pm UTC](https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453/1 "2021-06-29T19:25:52Z")

</div>

Hey all! First-time poster. Long-time Bubble dev, first time Thunkable dabbler.

I have a pretty complex webapp that runs great on Mobile Safari and Chrome. However, video behaves differently on Thunkable’s webview. Fistly, background video doesn’t play. Smaller on-screen videos that should autoplay inline, go fullscreen immediately.

I’m using the correct HTML on my webapp to make it autoplay on mobile devices:  
`<video autoplay playsinline muted loop>`

Is Thunkable’s WebView updated? As of iOS 10 I believe that video was allowed to play inline on web.

Is there a trick to this?

Thanks for helping a newbie out!

---

<div class="post-metadata">

### Author: ![pewu](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pewu/32/109466_2.png) [@pewu](https://community.thunkable.com/u/pewu)
#### Post date: [July 6, 2021, 6:35pm UTC](https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453/2 "2021-07-06T18:35:59Z")

</div>

Bump. Would really love help with this. Thanks guys!

---

<div class="post-metadata">

### Author: ![djbon26](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@djbon26](https://community.thunkable.com/u/djbon26)
#### Post date: [February 15, 2023, 8:06am UTC](https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453/3 "2023-02-15T08:06:16Z")

</div>

Hi yes this is possible

```auto
import WebKit

enum MyURLError: Error {
    case invalidURL
    
    var description: String {
        switch self{
            case .invalidURL:
            return "Your url is invalid"
        }
    }
}

struct WebView: UIViewRepresentable{
    let url: URL?
    let onError: (MyURLError) -> Void
    
    func makeUIView(context: Context) -> WKWebView {
        var config = WKWebViewConfiguration()
        config.allowsInlineMediaPlayback = true
        return WKWebView(
            frame: .zero,
            configuration: config
        )
    }
    
    func updateUIView(_ uiView: WKWebView, context: Context) {
        guard let myUrl = url else{
            return
        }
        let request = URLRequest(url: myUrl)
        uiView.load(request)
    }
}

```

Then in your navigation view you can call something like this:

```auto
WebView(url: URL(string: "https://lytudeyt2url.netlify.app/yttohtml5.html?url=\(id)"),
        onError: {err in
    print(err.description)
})
.frame(height: 500)

```

I’ll update my answer when I find a way to play it in the background. For now this just stops it from entering full screen

Brendan O.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:20pm UTC](https://community.thunkable.com/t/webview-background-video-not-working-video-auto-plays-fullscreen-on-ios/1370453/4 "2024-11-08T13:20:02Z")

</div>


