Autoplay Youtube video - iframe - android

As you could make a Youtube video it will automatically run ?
I used autoplay = 1 and does not work
The video is for Android app
The code from the video is:
<div class="demo-wrapper" data-role="page" id="tutoPage" style="margin-top: 0px;">
<div class="header" data-role="header">
<span class="title">Tutorial</span>
</div>
<div class="content" data-role="content">
<iframe id="bgvid" src="https://www.youtube.com/embed/*****?rel=0&autoplay=1" ></iframe>
<div id="tutorial" >
<a id='tuto' href='#initPage' >continuar</a>
</div>
</div>
</div>

Replace the ; before autoplay=1 with &.
EDIT: autoplay doesn't work on webviews. You have to use youtube api to achieve that.

Use the url like this:
https://www.youtube.com/embed/*******?rel=0&autoplay=1

Related

jquery dropdown and text boxes don't work on ios chrome browser

I have a very basic search page with dropdowns and text boxes.
The snippet looks like following
<div class="container" style="width: 100%;">
<div class="row">
<div class="input-group col-sm-4 col-md-4" style="float: left; margin-bottom: 10px; max-width:0px;">
<span class="input-group-addon" id="basic-addon2">Business Name</span>
#Html.LabelFor(m => m.Parameters.BusinessName, new { style = "display: none;" })
#Html.TextBoxFor(m => m.Parameters.BusinessName, new { #maxlength = 50, #class = "form-control", #placeholder = "Enter a business name", #aria_describedby = "basic-addon2", #style = "width:350px;" })
</div>
<div class="input-group col-sm-4 col-md-4" style="float: left; margin-bottom: 10px; max-width:0px;">
#Html.LabelFor(m => m.Parameters.BusinessNameSearchType, new { style = "display: none;" }) #Html.DropDownListFor(m => m.Parameters.BusinessNameSearchType, searchtypes, new { #class = "form-control", #style = "width:150px;" })
</div>
</div>
</div>
And on the page this snippet looks like following.
I use bootstrap 3.3.5 and jQuery 2.1.4.
It works perfectly fine on desktop, android tablet, and android phone, when I use Chrome as a browser.
However, both textbox and dropdown break completely (break as becoming completely unusable) when I try viewing it on the newer versions of iPhone ios Chrome browser.
Interestingly enough, when I tried to emulate it in Chrome as the iPhone X, it worked fine as well.
I am completely new to the whole ios topic. Doing some basic research led me to believe that older versions of bootstrap/jquery might be the issue.
Trying to update to bootstrap 4, which also leads to updating jquery to 3.0.0, completely breaks the whole application, so I had to revert it back.
Before I dive too deep into fighting the whole bootstrap/jquery thing, can anyone please provide me any useful pointers to why ios is so picky? I want to get at least the basic understanding of what the problem is before I start digging into possible solutions.
I have added two example with help of (Bootstrap-4) as your posted instruction.1st - Break textbox and dropdown on mobile.2nd - Not break textbox and dropdown on both Desktop & Mobile.
You can check below snippet.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<div class="py-3">
<div class="container l">
<div class="row">
<div class="col-md-12">
<h5>Textbox & Dropdown (Break on Mobile Screen)</h5>
</div>
<div class="col-md-8 my-2">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3">Business Name</span>
</div>
<input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3" placeholder="Enter a business name">
</div>
</div>
<div class="col-md-4 my-2">
<select class="custom-select">
<option>Exact Match</option>
<option>Option #1</option>
<option>Option #2</option>
<option>Option #3</option>
</select>
</div>
</div>
<br><br>
<div class="row">
<div class="col-md-12">
<h5>Textbox & Dropdown (Not break on Desktop/Mobile Screen)</h5>
</div>
<div class="col-8 my-2 pr-1 pr-md-3">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3">Business Name</span>
</div>
<input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3" placeholder="Enter a business name">
</div>
</div>
<div class="col-4 my-2 pl-1 pl-md-3">
<select class="custom-select">
<option>Exact Match</option>
<option>Option #1</option>
<option>Option #2</option>
<option>Option #3</option>
</select>
</div>
</div>
</div>
</div>

mdl-materialdesignlite-drawer menu not working?

<div class="mdl-layout--large-screen-only mdl-layout__tab-bar mdl-js-
ripple-effect mdl-color--primary-dark ">
Aboutus
Technology
Outsourcing
Training
Techblog
Careers
Contactus
<button class="mdl-button mdl-js-button mdl-button--fab mdl-js-
ripple-effect mdl-button--colored mdl-shadow--4dp mdl-color--
accent" id="add">
<i class="material-icons" role="presentation">add</i>
<span class="visuallyhidden">Add</span>
</button>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">MaterialDesignLite</span>
<nav class="mdl-navigation">
Overview
Features
Details
Technology
FAQ
</nav>
</div>
Question: mdl-layout__tab-bar tabs are synced with section id(example:#Aboutus ,#Technology),
Where as mdl-drawer needs separate .html file for each content,it is not working with section id (example:#Aboutus ,#Technology),is any possible ways to achieve it,rather creating separate html file.
Thanks
<div class="mdl-layout__tab-panelmdl-layout__drawer" id="Techblog">
<section>
<div>
<div>
<div class="techblogimage">
<img class="article-image" src="images/techblog/3.png" border="0" alt="">
</div>
</div>
</div>
</section>
</div>
Finally i got a solution..
adding mdl-layout__drawer in sectionblock
This will help few of them who got stuck in this..

JSoup not properly extracting elements by class

I have the following element in a webpage:
<div id="pnNij" class="post" data-tag1="" data-tag2="">
<a class="image-list-link" href="http://imgur.com/gallery/pnNij" data-page="0">
<img alt="" src="./Imgur_ The most awesome images on the Internet_files/H7fZCNgb.jpg">
<div class="point-info gradient-transparent-black transition">
<div class="relative">
<div class="pa-bottom">
<div class="arrows">
<div title="like" class="pointer arrow-up icon-upvote-outline" data="pnNij" type="image" data-up="4212"></div>
<div title="dislike" class="pointer arrow-down icon-downvote-outline" data="pnNij" type="image" data-downs="502"></div>
<div class="clear"></div>
</div>
<div class="point-info-points" title="points">
<span class="points-pnNij">3,710</span>
<span class="points-text-pnNij">points</span>
</div>
</div>
</div>
</div>
</a>
<div class="hover">
<p>Seems like 2017 has it all...</p>
<div class="post-info">
album ยท 69,542 views
</div>
</div>
</div>
notice how the href is equal to http://imgur.com/gallery/pnNij.
However, when I use JSoup to extract elements from the page like this:
docImgur = Jsoup.connect("http://imgur.com/").get();
Elements links = docImgur.getElementsByClass("post");
The element is almost extracted properly, except the href attribute is equal to /gallery/pnNij/
Why does the href attribute not contain the full URL?
When you check the page source, you'll find
<a class="image-list-link" href="/gallery/WRzti" data-page="0">
...
</a>
So the href attribute is not absolute, which results in your expected results: /gallery/WRzti
Solution
Use the abs: attribute prefix.
Example
Document docImgur = Jsoup.connect("http://imgur.com/").get();
Elements links = docImgur.select("a[href].image-list-link");
for (Element element : links) {
System.out.println(element.attr("abs:href"));
}
Output
http://imgur.com/gallery/WRzti
http://imgur.com/gallery/tCnDJ
http://imgur.com/gallery/JIHYh
...

Youtube url not working with android webview

In my hybrid basis android application, When i load the following embed code in webview,audio only coming and the screen shows blank screen,Here the html code,
<tr>
<td width="20%" class="dr"><strong>Wk 0 Tues</strong></td>
<td width="40%">Three surprising reasons to pray</td>
<td width="20%" > <a href="#this-video-1" id="video1" data-rel="popup" data-position-to="window" data-transition="pop" style="color:#fff" >VIDEO</a></td>
</tr>
<div data-role="popup" id="this-video-1" data-overlay-theme="a" data-theme="c" data-dismissible="false" class="ui-content">
<a href="#" data-rel="back" data-role="button" data-theme="f" data-icon="delete" data-iconpos="notext" class="ui-btn-right" id='close1'>Close</a>
<div id="video-holder">
<object id="raj" width="100%" height="250" type="text/html" data="http://www.youtube.com/embed/2qzxf0B0byA">Unable to play video. Please check your internet connection.
</object>
</div>
</div>
What change requires to show the audio and video together.
Call WebView.setWebChromeClient(new WebChromeClient()); on your WebView instance.

Srcollableview in swapview in dojox mobile

I have noticed strange thing - when I put ScrollableView into SwapView and I programmatically (after clicking on button) change view in SwamView and next give focus (click one elment in list) to list in ScrollableView, the first view appear under this one with list in ScrollableView which is currently main view (both are visible at the same time - one superimposed on the other). I use it in PhoneGap as a Android project. And the version of Dojo which I use is 1.9.
My code is:
<div id="view1" data-dojo-type="dojox/mobile/SwapView">
<div data-dojo-type="dojox.mobile.ContentPane" data-dojo-props='href:"page1.html", parseOnLoad: false, onLoad:NewClientForm.loadForm'></div>
</div>
<div id="view2" data-dojo-type="dojox/mobile/SwapView">
<div data-dojo-type="dojox.mobile.ContentPane" id="cview2" data-dojo-props='href:"page2.html", parseOnLoad: true'></div>
</div>
and the page2.html
<div id="offer_page">
<div class="pageLogo">
<img src="theme/images/logo.png" alt="" />
</div>
<header>
<h1 id="offer_page_client_name_header"> </h1>
</header>
<div id="new_client_nav_menu" class="pageNavMenu">
<div>menu</div>
</div>
<div id="new_client_nav_settings" class="pageNavSettings">
<div>set</div>
</div>
<div class="pageNavPrev">
<div id="offer_page_nav_prev" class="pageImageLink" data-dojo-type="dojox/mobile/Button" data-dojo-props='onClick: OfferPageForm.prevButton'><img src="theme/images/nav_prev.png" alt="" /></div>
</div>
<div class="pageNavNext">
<div id="offer_page_nav_next" class="pageImageLink" data-dojo-type="dojox/mobile/Button" data-dojo-props="onClick: OfferPageForm.nextButton"><img src="theme/images/nav_next.png" alt=""></div>
</div>
<ul data-dojo-type="dojox/mobile/TabBar" data-dojo-props='barType:"standardTab", center:false'>
<li data-dojo-type="dojox/mobile/TabBarButton" data-dojo-props='selected:true, moveTo:"tab1"'>Client data</li>
<li data-dojo-type="dojox/mobile/TabBarButton" data-dojo-props='moveTo:"tab2"'>Needs analysis</li>
<li data-dojo-type="dojox/mobile/TabBarButton" data-dojo-props='moveTo:"tab3"'>Offers</li>
<li data-dojo-type="dojox/mobile/TabBarButton" data-dojo-props='moveTo:"tab4"'>Simulations</li>
</ul>
<div id="tab1" data-dojo-type="dojox.mobile.View" class="tabView">
Client data:
</div>
<div id="tab2" data-dojo-type="dojox.mobile.View" class="tabView">
Needs analysis
</div>
<div id="tab3" data-dojo-type="dojox.mobile.View" class="tabView">
<div class="offersLeftPanel">
<div class="offersLeftPanelTableHeader">
<div class="offersLeftPanelTableDate">Creation date</div>
<div class="offersLeftPanelTableProduct">Product</div>
<div class="offersLeftPanelTableName">Name</div>
<div class="offersLeftPanelTableRisk">Risk Profile</div>
<div class="offersLeftPanelTableStatus">Status</div>
<div class="offersLeftPanelTableSigned">Signed</div>
<div class="offersLeftPanelTableActions">Actions</div>
</div>
<div data-dojo-type="dojox.mobile.ScrollableView" data-dojo-props="height: '88%'">
<ul data-dojo-type="dojox/mobile/EdgeToEdgeList">
<li data-dojo-type="dojox.mobile.ListItem" class="offersLeftPanelTableRow">
<div class="offersLeftPanelTableDate">2013-03-25 08:00</div>
<div class="offersLeftPanelTableProduct">iSave Target</div>
<div class="offersLeftPanelTableName">iSavetarget-Medium-1</div>
<div class="offersLeftPanelTableRisk">Neutral</div>
<div class="offersLeftPanelTableStatus">New</div>
<div class="offersLeftPanelTableSigned">No</div>
<div class="offersLeftPanelTableActions"></div>
</li>
<li data-dojo-type="dojox.mobile.ListItem" class="offersLeftPanelTableRow">
<div class="offersLeftPanelTableDate">2013-03-25 08:00</div>
<div class="offersLeftPanelTableProduct">iSave Target</div>
<div class="offersLeftPanelTableName">iSavetarget-Medium-1</div>
<div class="offersLeftPanelTableRisk">Neutral</div>
<div class="offersLeftPanelTableStatus">New</div>
<div class="offersLeftPanelTableSigned">No</div>
<div class="offersLeftPanelTableActions"></div>
</li>
...
</ul>
</div>
</div>
<div class="offersRightPanel">
<div data-dojo-type="dojox/mobile/Button" class="offersOtherNeedsButton">Other uncovered needs</div>
<div class="offersBottomButtons">
<div data-dojo-type="dojox/mobile/Button" class="offersConsolidateButton">Consolidate offers and issue</div>
<div data-dojo-type="dojox/mobile/Button" class="offersIssueButton">Issue proposal</div>
</div>
</div>
</div>
<div id="tab4" data-dojo-type="dojox.mobile.View" class="tabView">
Simulations
</div>
page1.html looks very similar, but ther are no lists and ScrollableViews.
The most interesting thing is the fact that it occurs not every time and not on every devices on which I have a chance to test it (I tested it on Samsung Galaxy Tab 2? - here I have noticed this issue, Asus Transformer and one "no name").
Thanks in advance for any help.
The HTML in your page2.html seems malformed (the top-level is not closed). Besides that, the HTML you posted uses JavaScript and CSS pieces which are missing. All in one, I can't correctly run your code to see if I reproduce.
On the other side, one of the SwapView tests in dojox/mobile/tests (test_SwapView.html) includes a button which programmatically transitions to a swap view - quite close to what you describe. Do you reproduce using this sample or can you modify it to reproduce your issue?
Finally, telling the Android version of the devices where you reproduce would help too.

Categories

Resources