Show Video Within Text

Is there a way to have a video play inline on iOS without expanding to full screen when clicking the play button?

I attempted

to add webkit-playsinline

<video width="400" controls webkit-playsinline>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>

I also tried incorporating it in this JSFiddle example <-- Please view on your Phone/Tablet

Any suggestions on how to achieve this?

Answer №1

To implement this in Obj C, make sure to include the following code:

webview.allowsInlineMediaPlayback = YES;

Your current attribute should look like this:

<video id="player" width="480" height="320" webkit-playsinline>

Explore HTML5 FullScreen API

Learn more about using the HTML5 Full Screen API at: http://www.sitepoint.com/use-html5-full-screen-api/
For detailed information on the Fullscreen API, visit: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API

Check out these Webkit Fullscreen properties for further experimentation:

  1. document.webkitCurrentFullScreenElement
  2. document.webkitCancelFullScreen
  3. document.webkitFullScreenKeyboardInputAllowed
  4. document.webkitIsFullScreen

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Learn the process of invoking componentDidMount each time you switch between ListItems in React

After initializing the widget component to load various charts, it works correctly. However, when switching to another ListItem, the componentDidMount does not load the required data. This data is essential for the component to function properly. I noticed ...

Tips for verifying an input field in a React application

I have been searching for validation solutions in React, specifically for a single input field. Unfortunately, I haven't been able to find a solution that fits my needs yet. If anyone can assist me in creating a validation process for this input field ...

Issue with exporting VueJS-generated HTML containing checkboxes results in loss of checkbox checked state

In the template of my component, I have a checkbox code that looks like this: <div ref="htmlData"> <input type="checkbox" class="mycb" :id="uniqID" :disabled="disabled" v-model="cbvalue" > &l ...

Firefox's Sneaky Scrollbars

On my website, I have a dropdown menu with 4 links leading to different sections - About Us, Platform, Contact Us, and Information. However, whenever one of these links is clicked, a vertical scrollbar appears. I have attempted to use the following code t ...

Storing and updating object property values dynamically within a for...in loop in JavaScript

I am currently working on a Node application powered by express and I am looking to properly handle apostrophes within the incoming request body properties. However, I am not entirely convinced that my current approach is the most efficient solution. expo ...

Utilize Uppercase Letters in React Routes

I am currently developing a simple React application, but I have encountered an unusual issue with the router. It always capitalizes the first letter of the pathname and I cannot figure out why. app.js import React from "react"; import ReactDOM from "rea ...

JEST: Troubleshooting why a test case within a function is not receiving input from the constructor

When writing test cases wrapped inside a class, I encountered an issue where the URL value was not being initialized due to dependencies in the beforeAll/beforeEach block. This resulted in the failure of the test case execution as the URL value was not acc ...

Express application correctly returning designated status codes with accurate response bodies

Being relatively new to express, only a few weeks in, I had initially assumed that error handling would be as straightforward as it is with springboot. However, my experience has proved me wrong. Here's how my express app is set up: The request comes ...

Easy Ways to Personalize the Appearance of Your Material-UI Tab Indicator

I've been working on customizing the tab indicator in material-ui and so far I've only been able to make rectangular or square shapes. I'm wondering if there's a way to turn it into an arrow or an upside-down triangle instead? Here is ...

Discovering the color of a locator (Button/Label) through a CSS locator in Selenium: What's the method?

I have a set of automation scripts in place that handle the downloading and saving of files from a server. These scripts also involve moving the downloaded files from the downloads folder to a user-specific location. When this process is complete, the co ...

change content of attached document when clicked

On all of my pages, I have included my header.php file. However, I am facing an issue with destroying sessions. Even though I have a logout.php page where I attempt to destroy the session, it is not happening as expected. The session remains registered wit ...

What is the correct way to create a new SystemError object in Node.js?

After studying Node's documentation, it is evident that SystemError is an extension of the Error class. However, when attempting to utilize SystemError directly, Node throws a ReferenceError indicating that SystemError is undefined. While it is theor ...

Creating a User Registration and Authentication System with JavaScript for a Database

I'm new to the world of web development and I've encountered a bit of a challenge. I'm looking for a Javascript framework that can handle user registration and authentication with a database, similar to what I would do with PHP and MySql. I ...

What is the best method for retrieving text from elements designated by class?

I am currently using BeautifulSoup to scrape data from a website, but I am facing an issue with extracting only the text I need. The specific part of the website data that I want to grab is: <div content-43 class="item-name">This is the te ...

An unexpected 'undefined' occasionally tacked onto 1% of the URLs visitors requested on my website starting from June 12, 2012

Ever since June 12, 2012 at 11:20 TU, I have been noticing strange errors in my varnish/apache logs. At times, after a user has requested a page, I observe a similar request moments later but with the URL string after the last "/" being replaced by "undef ...

I'm experiencing an issue where my drum app element does not refresh after performing an action dispatch

Struggling with my React/Redux drum app, I'm at a roadblock with the final component that should update with the selected object's ID through an action dispatch. It baffles me why the element won't reflect the changes even though I've c ...

Why is my jQuery AJAX POST request callback not functioning properly?

I'm attempting to send data to my controller using a POST request like this; $.ajax({ url: "/Shipment/SaveTrackingNumber/", type: "POST", data: JSON.stringify(obj), ...

Safari is unable to display the button text, while Chrome has no problem showing it

In Safari, the text of the button is not showing up properly. I am able to retrieve the text using jQuery in the console though. However, there seems to be an issue with recognizing the click event. <div class="btn-group btn-group-lg"> <button ...

Introducing a new div element completely disrupts the overall layout

Take a look at the code I have provided below. http://jsfiddle.net/xymgwonu/3/ Everything was working perfectly fine until I introduced a new div with the class name <div class="bubble"></div>. This caused some issues with the overall design. ...

Here's a guide on how to package and send values in ReactJs bundles

I'm currently involved in a ReactJs project that does not rely on any API for data management. For bundling the React APP, we are using Webpack in the project. The challenge now is to make the React APP usable on any website by simply including the ...