This is the html to display 3 videos on the screen. When this is viewed on a mobile device (e.g. Samsung S8), the screen automatically activates.
<div class="row bottom-whitespace">
<div class="col-sm-4">
<figure class="img-tbtext video-icon">
<div class="vid-banner"><img src="../assets/images/video-img1.jpg" class="hover-img">
<div class="lazyOwl"><img src="../assets/images/play-Icon.png"></div>
</div>
<a class="gallery" data-flashy-type="video" href="https://youtu.be/ZfDRNqWfGas" frameborder="0" allowfullscreen=""></a>
<h5>Change, project and task management</h5>
</figure>
</div>
<div class="col-sm-4">
<figure class="img-tbtext video-icon " style="background: #ffc107;">
<div class="vid-banner"><img src="../assets/images/video-img2.jpg" class="hover-img">
<div class="lazyOwl"><img src="../assets/images/play-Icon.png"></div></div>
<a class="gallery" data-flashy-type="video" href="https://youtu.be/MY_CFDnNTzU" frameborder="0" allowfullscreen=""></a>
<h5>Process excellence & waste management</h5>
</figure>
</div>
<div class="col-sm-4">
<figure class="img-tbtext video-icon" style="background: #8bc34a;">
<div class="vid-banner"><img src="../assets/images/video-img3.jpg" class="hover-img"><div class="lazyOwl"><img src="../assets/images/play-Icon.png"></div></div>
<a class="gallery" data-flashy-type="video" href="https://youtu.be/gYfdvWWf1p8" frameborder="0" allowfullscreen=""></a>
<h5>Quality control, Audit and Quality assurance</h5>
</figure>
</div>
</div>
Autoplay Videos
In Safari and some other browsers(mobile), autoplay for videos are prevented and an active input from a user is needed. Safari and Chrome decide that on an algorithm which depends on your browser behaviour:
Safari: https://www.cnet.com/news/wwdc-privacy-high-sierra-safari-blocking/
Chrome: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Can you give us some reproducible code? This way we can check what goes on and maybe find your problem. :)
Related
Angular 6: Images takes time to load in chrome
This issue is specifically in chrome and not in any other browser.
We have used Firebase in our project, and used snapshotchange method to fetch the image to angular project from the same, the image urls are like this https://firebasestorage.googleapis.com/v0/b/test-4a5d9.appspot.com/o/download.jpg?alt=media&token=a78321fc-eb9c-496a-a690-e8b2ccddf6c6 . There is something wrong due to which, image loads very slowly and the screen becomes blank when we scroll up and down in the browser, here we have used "ngx-infinite-scroll".
I have also tried by concatenating .jpg extension after the image but the scenario remains the same.
First, I thought the problem is with the size of image which is affecting the loading speed, so then I have replaced the images with https://upload.wikimedia.org/wikipedia/commons/b/b9/Pizigani_1367_Chart_1MB.jpg which is a heavy size of image, but here the website run's smoothly without any issue.
But it does not scroll smoothly when image urls are like this https://firebasestorage.googleapis.com/v0/b/test-4a5d9.appspot.com/o/download.jpg?alt=media&token=a78321fc-eb9c-496a-a690-e8b2ccddf6c6
Here is the code to set images in one list item:
<div class="slider">
<div class="slideshow-container" id="{{works.id}}_" *ngIf="works.media">
<div class="imgSlides imgsss active" *ngIf="works.media.aFront != undefined">
<div class="content">
<div>
<img src="{{works.media.aFront}}" alt="front img" />
</div>
</div>
</div>
<div class="imgSlides imgsss" *ngIf="works.media.bBack != undefined">
<div class="content">
<div>
<img src="{{works.media.bBack}}" alt="back img" />
</div>
</div>
</div>
<div class="imgSlides imgsss" *ngIf="works.media.cLeft != undefined">
<div class="content">
<div>
<img src="{{works.media.cLeft}}" alt="left img" />
</div>
</div>
</div>
<div class="imgSlides imgsss" *ngIf="works.media.dRight != undefined">
<div class="content">
<div>
<img src="{{works.media.dRight}}" alt="right img" />
</div>
</div>
</div>
<div class="imgSlides imgsss" *ngIf="works.media.ePanoroma != undefined">
<div class="content">
<div>
<img src="{{works.media.ePanoroma}}" alt="panoroma img" />
</div>
</div>
</div>
<div class="imgSlides imgsss" *ngIf="works.media.fDetail != undefined">
<div class="content">
<div>
<img src="{{works.media.fDetail}}" alt="detail img" />
</div>
</div>
</div>
<!-- arrow -->
<div *ngIf="works.imageCount>1">
<a class="next arrow-control" (click)="plusSlide(1,works.id + '_')"> <img src="assets/image/backward.png" alt="previous arrow" /> </a>
<a class="prev arrow-control" (click)="plusSlide(-1,works.id + '_')"> <img src="assets/image/forward.png" alt="next arrow" /> </a>
</div>
<p class="sold-btn" *ngIf="works.isSold">{{'Sold'}}</p>
</div>
<div class="slideshow-container" *ngIf="isEmptyObject(works.media)">
<div class="content">
<div [ngStyle]="{'background-image': 'url(' + defaultimg + ')'}" class="img-thumb"></div>
</div>
</div>
<div style="text-align:center;display:none;" class="bullets">
</div>
</div>
Here is the video of the problem:
https://drive.google.com/file/d/1Ipl-34rOE2ZcscF3jrPYw2C9WfgnA29U/view?usp=sharing
Do the images need to be private?
You don't have any caching enabled on your images.
If you check the headers for the image they have Cache-Control: private.
Since the browser isn't allowed to cache the images, it might affect the performance quite a bit.
Potential fix
I would suggest allowing the user to cache the images for at least an hour.
You will need to set the correct cache headers when uploading the images.
But you can easily via googles gsutil set the headers for all files in a folder
This is what I use:
Where in this case we cache the images for 1year and make them immutable causing the browser to always use the cached version
gsutil -m setmeta -h "Cache-Control:public,max-age=31536000,immutable" 'gs://my-storage-bucket-name/myimagefolder/**/*.{jpg,png}'
Hopefully this could make the app more performant, but you will have to try to know.
I'm trying to figure out why my small static webpage isn't showing up properly when viewed on mobile (noticed on Chrome android app). According to the docs, the columns should automatically stack on mobile. But, when I view it I see a normal view of the page with the width fitting correctly to the screen, but the columns stay in one row. Shown in the below screenshot.
I tested to see if it's my code by resizing the page on a desktop browser and the page responded as expected, stacking the cards so in a single column. Here's a desktop-view imitated on my phone.
Any idea what's going on? What am I doing wrong? Here's the code
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.3/css/bulma.css"/>
</head>
<body style="background-color:#00aced;">
<div class="container">
<div class="notification" style="background-color:#fff">
<strong>Remember:</strong> In order to continually receive updates, please install the GoodSamarit4n repository from
here. This is the <em>only</em> official source. The reason I am providing links to the add-on zips is for complete transparency and for those who would like to study and learn from the code.
<br>
</div>
</div>
<div style="padding: 20px;" class="container">
<div class="columns">
<div class="column">
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
<img src="https://pugdaddy.000webhostapp.com/images/githubforkodi.png" alt="Image">
</figure>
</div>
<header class="card-header">
<p class="card-header-title">
Githubforkodi
</p>
</header>
<div class="card-content">
<div class="content">
A kodi program add-on for managing your github account. View repos, branches, notifications, Open/Close/Comment on issues, Merge/Deny pull requests, Get real-time notifications, And much more! The power of github combined with the simplicity of kodi.
Creator #goodsamarit4n. <a>#kodi</a> <a>#github</a> <a>#program</a> <a>#add-on</a>
<br>
<small>8:00 PM - 24 Jul 2017</small>
</div>
</div>
</div>
</div>
<div class="column">
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
<img src="https://pugdaddy.000webhostapp.com/images/pugdonut.png" alt="Image">
</figure>
</div>
<header class="card-header">
<p class="card-header-title">
Squeee!
</p>
</header>
<div class="card-content">
<div class="content">
A kodi video add-on that provides cute, funny, and heartwarming animal videos from all over the internet. Skip the endless clicking around your favorite sites and let Squeee! bring all of those sites to you in an easy-to-digest fashion. Click through videos one at a time or play an entire playlist and just sit back and embrace the fluffy.
Creator #goodsamarit4n. <a>#kodi</a> <a>#squeee</a> <a>#video</a> <a>#add-on</a> <a>#cute</a> <a>#animals</a>
<br>
<small>8:00 PM - 24 Jul 2017</small>
</div>
</div>
</div>
</div>
<div class="column">
<div class="card">
<div class="card-image">
<figure class="image is-4by3">
<img src="https://pugdaddy.000webhostapp.com/images/illuminati.jpg" alt="Image">
</figure>
</div>
<header class="card-header">
<p class="card-header-title">
Alternative Facts
</p>
</header>
<div class="card-content">
<div class="content">
Get ready to get beligerantly angry or find yourself continually muttering "What the f###?" under your breath. For those who enjoy seeing just how crazy some folks are. With documentaries on conspiracy theories gathered from all over the web. If you don't see a topic, feel free to tweet at me and I'll see about adding it for you.
Creator #goodsamarit4n. <a>#kodi</a> <a>#alternativefacts</a> <a>#video</a> <a>#add-on</a> <a>#conspiracy</a> <a>#theories</a>
<br>
<small>8:00 PM - 24 Jul 2017</small>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Adding the following meta tag may solves the problem.
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
I have the following bit of code that changes my logo on the mobile to a Click To Call image otherwise on all other sizes it's just a regular logo with no click to call feature. However I can't seem to get it to actually click to call. It does change the logo on the mobile size but it won't click to call. It does nothing when you click it. What I'm I doing wrong here?
<div class="container">
<div class="row">
<div class="col-xs-12 hidden-sm hidden-md hidden-lg" align="center">
<a href="tel:8003220503">
<img src="../mobile/Acrictc.png" class="btn-responsive" style="width:100%" alt="Image"></a>
<!--Mobile <img src="../mobile/Acrictc.png" class="img-responsive"alt="image" /> -->
</div>
<div class="hidden-xs col-sm-12 hidden-md hidden-lg" align="center">
<img class="img-responsive" src="../pics/AcriLogoBlue.jpg" width="220" height="120" alt="" />
<!--Tab-->
</div>
<div class="hidden-xs hidden-sm col-md-3 hidden-lg" align="center">
<img class="img-responsive" src="../pics/AcriLogoBlue.jpg" width="220" height="120" alt="" />
<!--Desktop-->
</div>
<div class="hidden-xs hidden-sm hidden-md col-lg-3" align="center">
<img class="img-responsive" src="../pics/AcriLogoBlue.jpg" width="220" height="120" alt="" />
<!--Large-->
</div>
<div class="hidden-xs hidden-sm col-md-5 col-lg-5" align="center">
<p>
<font color="#000080">Windows - Siding - Roofing - Bathroom Remodeling - Patio Spaces</font>
</p>
<a align="center"><h1><strong><font color="red">800-322-0503</font></strong></h1></a>
<p>
<font color="#000080">Quality Products at Unbelievable Prices - Since 1967</font>
</p>
</div>
<div class="col-md-3" align="center">
<span class="visible-lg"></span>
<img src="http://acricompany.com/pics/fpq2.gif" width="220" height="120" alt="" />
</div>
</div>
</div>
The issue you're having is that the very bottom <div> (the fpq2.gif) only has a class of col-md-3, which at smaller sizes is causing it to overlap the image above for some reason (didn't look into it). Add col-xs-12 and any other required classes to that div and your issue will be resolved.
First of all, know that there are such classes as visible-md and visible-xs. They save a lot of code and improve readability. Note that these classes are called hidden-*-up and hidden-*-down in Twitter Bootstrap 4 (where * stands for the size).
Secondly, note that SVG is supported really well these days, see: http://caniuse.com/#search=svg. You just might want to use that for your logo. SVG renders perfect on any size. This will drastically reduce the amount of images you need. You might end up with a 'click me' image with a visible-xs class and a regular one with an hidden-xs class.
Last of all, please note that looking at the rendered size of the page (which is done by Twitter Bootstrap) is not an acurate way (anymore) to determine the amount of pixels you need for your image, due to retina displays. A visible-xs class image might actually need more pixels to be perfectly sharp than an image with a hidden-xs class. Please read this article: http://www.webdesignerdepot.com/2015/08/the-state-of-responsive-images/ (or a similar one).
I coded up my website with html and css in Dreamweaver. When I open the html documents locally on my computer, the images all load (everywhere, including on the Art/Design page). When I uploaded all of the files to AWS, only three out of the sixteen gallery images loaded (the 7th, 8th, and 9th). For each of the gallery divs, including the images in them, the code is identical. When opened in chrome, developer tools show the images which didn't load cannot be found (404 error). The images do not load through the direct url or my domain. Other images outside of the gallery loaded fine.
Here is the html:
<section id="full-width">
<div class="title2">
<p>Fine Art</p>
</div>
<section id="pictures">
<div class="column">
<div class="gallery">
<img src="Images/Gallery/1.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Study of the Eye</h>
<h1>2016</h1>
<p>Graphite on paper.</p>
</div>
</div>
<div class="gallery">
<img src="Images/Gallery/2.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Study of the Iris</h>
<h1>2016</h1>
<p>Hard pastel on paper</p>
</div>
</div>
... <!--skipping a few elements-->
<!-- The following three images load without fail-->
<img src="Images/Gallery/9.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Fahrenheit 451 Alternate Cover</h>
<h1>2013</h1>
<p>Spray paint on newspaper on canvas</p>
</div>
</div>
</div>
<div class="column">
<div class="gallery">
<img src="Images/Gallery/12.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Glint</h>
<h1>2015</h1>
<p>Acrylic on illustration board</p>
</div>
</div>
<div class="gallery">
<img src="Images/Gallery/10.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Impressionist Self-Portrait</h>
<h1>2015</h1>
<p>Soft-pastel on illustration board.</p>
</div>
</div>
<!-- the following, again, do not load -->
<div class="gallery">
<img src="Images/Gallery/8.jpg" alt="" class="gallery-image">
<div class="title4">
<h>Self-Portrait: Creation</h>
<h1>2016</h1>
<p>Graphite on paper</p>
</div>
</div>
... <!-- skipping more elements -->
</div>
</div>
</div>
I don't understand how some images can load and others cannot. The images which load are not the smallest sized images of the group, and neither is there anything which sets them apart.
Bonus question: why can't my error.html page load the stylesheets? (Again, Chrome claims 404 error, cannot be found)?
I'm trying to load the bootstrap media object inside a span3 div.
Everything works, apart from the image. I've checked this link elsewhere and it has no issues.
Any suggestions
<div class="container">
<div class="row">
<div class="span3">
<div class="pull-left">
<h3>Top Devices</h3>
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="<?php echo base_url(); ?>resource/img/devices/Asus-Nexus-7.png"/>
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
</div>
</div>
</div>
</div>
If it's just a regular image you are loading into the span3, is there a reason why you are using data-src and not src ?
Or if you are also using something like foresight.js, for example, see if this post helps you
Good luck!
Check the source code out, probably it will gives you the answer.
I think you should add an slash:
data-src="/resource/img/devices/Asus-Nexus-7.png
instead of:
data-src="resource/img/devices/Asus-Nexus-7.png
Grretings