我有一个标准的HTML5文档宽度,音频标签来源于流媒体网址.
<audio controls="controls" autostart="0" src="[URL:PORT]/;"></audio>
<script type="text/javascript">
window.addEventListener("play", function(evt)
{
if(window.$_currentlyPlaying)
{
window.$_currentlyPlaying.pause();
}
window.$_currentlyPlaying = evt.target;
}, true);
</script>
Run Code Online (Sandbox Code Playgroud)
它适用于Chrome,Firefox和移动版Safari,但OSX上的Safari说:
在' http:// localhost/audiostream / '中阻止脚本执行,因为文档的框架是沙箱并且未设置'allow-scripts'权限.
沙盒'[URL:PORT]'因为它使用的是HTTP/0.9.
从"[URL:PORT]"取消资源加载,因为它使用HTTP/0.9并且文档加载了不同的HTTP版本.
无法加载资源:从"[URL:PORT]"取消资源加载,因为它使用HTTP/0.9并且文档加载了不同的HTTP版本.
谁知道什么是错的?
在我的 HTML 页面的标题中,我设置了以下 CSS 变量:
:root{
--data-color-primary: #ffcc00;
--data-color-secondary: #4b4b4b;
}
Run Code Online (Sandbox Code Playgroud)
在我的 SASS 文件中,我按如下方式使用它:
DIV.color {
&.color-primary {
background-color: var(--data-color-primary);
}
&.color-secondary {
background-color: var(--data-color-secondary);
}
}
Run Code Online (Sandbox Code Playgroud)
现在我尝试根据背景颜色的亮度设置字体颜色:
@function set-notification-text-color($color) {
@if (lightness($color) > 60) {
@return #000000;
} @else {
@return #ffffff;
}
}
DIV.color{
&.color-primary {
background-color: var(--data-color-primary);
color: set-notification-text-color(var(--data-color-primary));
}
}
Run Code Online (Sandbox Code Playgroud)
但是在我的 SASS 编译器中,我得到以下错误:
错误:参数
$color的lightness($color)必须是一种颜色
如何将 der CSS 变量移交给函数。
我的问题是,CSS 变量由用户(Liferay 7)在我的 CMS 的后端设置,并将呈现在 *.FTL 文件中并打印在 HTML 代码中。
$primary: ${clr_primary};
$secondary: ${clr_primary};
Run Code Online (Sandbox Code Playgroud)
然后我不能在我的 …
这是我的控制器动作:
public function jsonAction()
{
$this->view->setVariablesToRender(array('produkte'));
$this->view->setConfiguration(
array(
'produkte' => array(
'_descendAll' => array(
'only' => array('titel', 'beschreibung', 'bild', 'download', 'categories'),
'_descend' => array(
'bild' => array(),
'download' => array(),
'categories' => array(),
)
)
)
)
);
$this->view->assign('produkte', $this->produktRepository->findAll());
}
Run Code Online (Sandbox Code Playgroud)
我得到了一个非常不错的JSON-String。不幸的是,我仅获得包含文件(FAL)的PID和UID。如何获取完整对象或至少包含文件的路径?
/**
* Returns the bild
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $bild
*/
public function getBild()
{
return $this->bild;
}
/**
* Returns the download
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $download
*/
public function getDownload()
{
return $this->download;
}
Run Code Online (Sandbox Code Playgroud) 我有以下导航案例:
Home -> navCtrl.push(SearchPage) -> navCtrl.push(ResultPage)
Run Code Online (Sandbox Code Playgroud)
要么
Home -> navCtrl.push(SearchPage) -> navCtrl.push(ResultPage) -> navCtrl.push(DetailPage)
Run Code Online (Sandbox Code Playgroud)
我想导航回SearchPage.在第一种情况下,没有问题,我可以使用
this.navCtrl.pop()
Run Code Online (Sandbox Code Playgroud)
但是,在第二种情况下,我尝试使用
this.navCtrl.popTo(SearchPage)
Run Code Online (Sandbox Code Playgroud)
这不能按预期工作.Ionic仅在堆栈中导航一页.我知道popTo()存在问题(https://github.com/driftyco/ionic/issues/6513)
我怎么解决这个问题?