safari

PHP Safari PushNotifications “Extracting push notification package failed”

安稳与你 提交于 2020-12-15 06:15:17
问题 I'm trying to implement safari notifications and I have most things figure out. I'm following the official tutorial https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1 but I'm currently receiving the error: Extracting push notification package failed I have seen this topic APNs "Extracting push notification package failed" but it seems the

How to prevent Safari from implicitly converting character in XHR request?

时光毁灭记忆、已成空白 提交于 2020-12-15 05:25:31
问题 I picked this character 〉 as a separator for my combo-key-field for my DynamoDb database. That character surfaces in the browser as part of a next-page-query token. (in an endless scroll list view) Chrome properly sends that character to the backend (as part of the next-page-query token). However, Safari, sends that character as this character: 〉 , which is different, and as a result, my backend is unable to recognise it. Why is the browser changing the character? Is this behaviour expected?

CSS transform on SVG text element not working in Safari

我怕爱的太早我们不能终老 提交于 2020-12-12 11:22:05
问题 Trying to position a battery indicator within a parent SVG.The SVG <svg viewBox="0 0 24 24"> element has a path for the battery and a text element showing the percentage.Its being positioned with a couple of css transforms and text attributes.The text is correctly positioned when opening in chrome/firefox but goes offshoot in safari. <text text-anchor="middle" dominant-baseline="middle" style="transform:translate(50%,98%) scale(.2); font:700 13px sans-serif;fill:#deba78" >24.2%</text> Codepen

Stream HLS on safari using MediaSource api

半腔热情 提交于 2020-12-09 23:25:45
问题 I want to stream HLS fragments using media source extension. I have tried the same using mpeg-dash fragments (generated using MP4Box) and media source extension. var mediaSource = new window.MediaSource(); mediaSource.addEventListener('sourceopen', _onSourceOpen); $('video').attr('src', URL.createObjectURL(self.mediaSource)); function _onSourceOpen() { sourceBuffer = mediaSource.addSourceBuffer('video/mp4; codecs="avc1.64000d,mp4a.40.2"'); } function _onFragmentDataLoad(data) { sourceBuffer

Stream HLS on safari using MediaSource api

旧城冷巷雨未停 提交于 2020-12-09 23:08:14
问题 I want to stream HLS fragments using media source extension. I have tried the same using mpeg-dash fragments (generated using MP4Box) and media source extension. var mediaSource = new window.MediaSource(); mediaSource.addEventListener('sourceopen', _onSourceOpen); $('video').attr('src', URL.createObjectURL(self.mediaSource)); function _onSourceOpen() { sourceBuffer = mediaSource.addSourceBuffer('video/mp4; codecs="avc1.64000d,mp4a.40.2"'); } function _onFragmentDataLoad(data) { sourceBuffer

web概述,html概述及常用标签,文本处理

陌路散爱 提交于 2020-12-08 19:35:17
web概述 html概述 文本处理 常用标签 web概述: web三要素: 浏览器:向服务器发起请求,下载服务器中的网页(HTML),然后执行HTML显示出内容。 服务器:接受浏览器的请求,发送相应的页面到浏览器。 HTTP协议:浏览器与服务器的通讯协议。 常用浏览器 IE Edge FIREfox Chrome safari 特点: 图形化 与平台无关 分布式的 动态的 交互的 ###HTML概述 什么是HTML: 超文本标记语言(HyperText Markup Language,HTML)是一种用于创建网页的标准标记语言。HTML是一种基础技术,常与CSS、JavaScript一起呗众多网站用于设计令人赏心悦目的网页、网页应用程序以及移动应用程序的用户界面。 网页浏览器可以读取HTML文件,并将其渲染成可视化网页。HTML描述了一个网站的结构语义随着线索的呈现,使之成为一种标记语言而非编程语言。 什么是标记? HTML标记通常也被称为HTML标签,HTML标签是由尖括号包围的关键词。 HTML标签通常是成对出现的。 标签对中的第一个标签是开始标签,第二个标签是结束标签。 html标签分类: 开始标签:包括元素的名称,包裹在开始(<)和结束(>)尖括号中。这表示元素开始-在本例中表示了一个段落的开头。 结束标签:这与开始标记相同,除了它在元素名称之前有一个正斜杠(/)

Safari JavaScript setTimeout stops when minimized

佐手、 提交于 2020-12-08 06:29:15
问题 This is related to the following: Safari 9.1 for El Capitan Safari 10 for Sierra Does anyone know what is Safari doing in the JavaScript engine with respect to setTimeout() when the browser or the tab loses focus (mainly, is minimized)? I have created a simple JavaScript web application that I load in Safari that calls JavaScript setTimeout() that passes another function to be executed after the timeout value. The function prints the date/time to the console, then calls setTimeout() with the

Safari JavaScript setTimeout stops when minimized

点点圈 提交于 2020-12-08 06:27:54
问题 This is related to the following: Safari 9.1 for El Capitan Safari 10 for Sierra Does anyone know what is Safari doing in the JavaScript engine with respect to setTimeout() when the browser or the tab loses focus (mainly, is minimized)? I have created a simple JavaScript web application that I load in Safari that calls JavaScript setTimeout() that passes another function to be executed after the timeout value. The function prints the date/time to the console, then calls setTimeout() with the

快速获取dom到body左侧和顶部的距离,简单粗暴无bug-getBoundingClientRect

风格不统一 提交于 2020-12-06 03:05:58
获取dom到body左侧和顶部的距离-getBoundingClientRect 平时在写js的时候,偶尔会需要用js来获取当前div到 body 左侧、顶部的距离。网上查一查,有很多都是通过offsetTop、offsetLeft来计算出来的。我按照网上的查到的资料用了一次,算出来了一堆错误答案。 下面我要分享的这个方法,兼容性很好(ie4都ok),而且很方便,不会算错。 这个方法就是 getBoundingClientRect。 1.getBoundingClientRect方法简介 getBoundingClientRect 返回的是一个 DOMRect 对象,是一组矩形集合,我们这次所使用的返回值主要是left、top、bottom和right。其余的返回值width、height、x、y这次用不到,就不再讨论。 使用方法如下: let domToTop = dom.getBoundingClientRect().top // dom 的顶边到视口顶部的距离 let domToLeft = dom.getBoundingClientRect().left // dom 的左边到视口左边的距离 let domToBottom = dom.getBoundingClientRect().bottom // dom 的底边到视口顶部的距离 let domToRight = dom

Safari for Ipad not reporting line numbers on Javascript errors

时光毁灭记忆、已成空白 提交于 2020-12-05 05:09:27
问题 I am using iPad 2 with IOs 5 to develop a web application. I have enabled the developer console to get logs , but when javascript error occurs it does not include corresponding line number. Since the web application handles touch and gesture events, I cannot test them on desktop version of the browser! Any help will be appreciated. 回答1: You can add a window level error handler http://dev.opera.com/articles/view/better-error-handling-with-window-onerror/ and have that console log the line