Consistently show "Play" button on all browsers for MP3 Object - mp3

I'm using XHTML 1.1 plus MathML 2.0 plus SVG 1.1 (and I'd like to stick with it.)
I have some object elements to play music. For example:
<object id="Music_Player" type="audio/mp3" data="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3">
<param name="filename" value="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3" />
<param name="autoplay" value="false" />
<param name="autoStart" value="0" />
<param name="loop" value="false" />
</object>
In Firefox and Pale Moon, the media player has a little "play" button; in Chrome that button only SOMETIMES shows up, and in Edge I don't see it at all and the file cannot be played. How can I get the play button to show up consistently? For example, is there a "playbutton" parameter?

Related

SAS Parameter logconfigloc and conventional log output

I got the task to log user access to datasets in certain libraries.
To solve this I use the SAS Audit logger, which already provides the desired output.
To get this desired output, i use the start parameter logconfigloc with the following XML-file:
<?xml version="1.0" encoding="UTF-8"?>
<logging:configuration xmlns:logging="http://www.sas.com/xml/logging/1.0/">
<!-- Log file appender with immediate flush set to true -->
<appender name="AuditLog" class="FileAppender">
<param name="File" value="logconfig.xml.win.audit.file.xml.log"/>
<param name="ImmediateFlush" value="true" />
<filter class="StringMatchFilter">
<param name="StringToMatch" value="WORK"/>
<param name="AcceptOnMatch" value="false"/>
</filter>
<filter class="StringMatchFilter">
<param name="StringToMatch" value="Libref"/>
<param name="AcceptOnMatch" value="true"/>
</filter>
<!-- The DenyAllFilter filters all events not fullfilling the criteria of at least one filters before -->
<filter class="DenyAllFilter">
</filter>
<layout>
<param name="ConversionPattern"
value="%d - %u - %m"/>
</layout>
</appender>
<!-- Audit message logger -->
<logger name="Audit" additivity="false">
<appender-ref ref="AuditLog"/>
<level value="trace"/>
</logger>
<!-- root logger events not enabled -->
<root>
</root>
</logging:configuration>
My Problem is, that by using the logconfigloc parameter, the log parameter is not working any more hence I get no "conventional" SAS log.
I allready tried to enable the root logger, but it´s output only looks similar to the original logfiles but has some diffrences.
Is there an (easy) way to get the "conventional" SAS log in addition the to the afforementioned special access logging output?
Kind Regards,
MiKe
I found the answer to the question how to obtain the conventional log.
For this purpose the SAS logger named "App" with message level "info" can be used.
So the following XML does the trick:
<?xml version="1.0" encoding="UTF-8"?>
<logging:configuration xmlns:logging="http://www.sas.com/xml/logging/1.0/">
<appender name="AppLog" class="FileAppender">
<param name="File" value="D:\Jobs_MK\SAS_Logging_Facility\Advanced_Logging_Test_with_XML\logconfig_standard_log.log"/>
<param name="ImmediateFlush" value="true" />
<layout>
<param name="ConversionPattern"
value="%m"/>
</layout>
</appender>
<!-- Application message logger -->
<logger name="App" additivity="false">
<appender-ref ref="AppLog"/>
<level value="info"/>
</logger>
<!-- root logger events not enabled -->
<root>
</root>
</logging:configuration>

Adding dynamic parameters in fremarker android studio

I am creating a template using freemarker. I want to add few parameters at runtime. How it can be done. The following is a sample template code:
<?xml version="1.0"?>
<template
minApi="7"
minBuildApi="8">
<category />
<dependency name="android-support-v4" revision="8" />
<parameter
id="packageName"
name="Package name"
type="string"
constraints="package"
default="com.mycompany.myapp" />
...
...
...
<!-- 128x128 thumbnails relative to template.xml -->
<thumbs>
<!-- default thumbnail is required -->
<thumb>thumb_file.png</thumb>
</thumbs>
<globals file="globals.xml.ftl" />
<execute file="recipe.xml.ftl" />
I want to generate a parameter while clicking a button in the template. Is it possible to do so? Is there any proper documentation available.
You can use the visibility attribute. For example, in the following:
<parameter
id="includeLayout"
name="Create layout XML?"
type="boolean"
default="true"
help="Generate a layout XML" />
<parameter
id="layoutName"
name="Layout Name"
type="string"
constraints="layout|nonempty|unique"
default="fragment_default"
visibility="includeLayout"
suggest="fragment_${camelCaseToUnderscore(className)}"
help="The name of the fragment layout to create" />
visibility="includeLayout" means that that field will only be visible when includeLayout is checked as true

TinyMCE insert wrong code

I'm trying to insert video to an article. I'm using TinyMCE. For example I want to insert video with url http://techslides.com/demos/sample-videos/small.mp4 and HTML5 type. Tiny generates code
<video width="320" height="240" preload="none" src="http://techslides.com/demos/sample-videos/small.mp4">
<object width="320" height="240" data="/media/editors/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf" type="application/x-shockwave-flash">
<param name="src" value="/media/editors/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf" />
<param name="flashvars" value="url=http%3A//techslides.com/demos/sample-videos/small.mp4&poster=/" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="true" />
</object>
</video>
It doesn't show video player.
There is no console errors. Urls to .js scripts are correct.
What's wrong?
this works for me with TinyMce, but I don't have the same results. Instead of :
<video width="320" height="240" preload="none" src="http://techslides.com/demos/sample-videos/small.mp4">
I have this 2 lines :
<video width="320" height="240" controls="controls" autoplay="autoplay" name="media">
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4" />
Maybe you have to configure tinyMCE (extensions/manage plug-in and filter to find tinyMCE, mine is set to extended), or install a more permissive and configurable editor like JCE

Is there a way to register your app to some URLs just like in normal Android?

I would like to register my app to foursquare URLs and user would see a Intent chooser between browser and my app. It doesn't seem to work, default browser is always launched.
I was trying to call this code:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("https://foursquare.com/v/san-francisco-international-airport-sfo/41059b00f964a520850b1fe3"));
startActivity(i);
And I registered this way in manifest:
<activity android:name=".IntentActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="foursquare.com" />
</activity>
My app was never called, only browser. Are there Intent Choosers on Glass?

is it possible to have a new file for each new day with log4cXX

I know the rollingPolicy parameter for log4cxx config file, but I can't manage to have the config file which can tell the logger to create a new file each new day, how could I achieve this result ?
Yes. Using rolling style of Composite like this:
<appender name="LogAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4j.Util.PatternString" value="LogFile.log" />
<appendToFile value="true" />
<rollingStyle value="Composite" />
<datePattern value="yyyyMMdd" />
<maxSizeRollBackups value="7" />
<maximumFileSize value="100MB" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date{ISO8601}: [%2thread] %-5level %logger: '%P{network}.%P{node}' %message%newline" />
</layout>
</appender>
Ref.:
Short introduction to Apache log4cxx
log4net Config Examples
I think the following appender will do the stuff ( can't test it on this pc )
<!-- the following appender with the name "TimeBasedLog.log", every night a few seconds after
12::00PM the old log will be renamed with append the date in filename, and a new log file
with the name "TimeBasedLog.log" will be create.
notice the RollingFileAppender is under "org.apache.log4j.rolling" namespace
-->
<appender name="MyRollingAppenderDaily" class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="FileNamePattern" value="TimeBasedLog.%d{yyyy-MM-dd}.log"/>
<param name="activeFileName" value="TimeBasedLog.log"/>
</rollingPolicy>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %x [%p] (%F:%L) %m%n"/>
</layout>
<param name="file" value="TimeBasedLog.log"/>
<param name="append" value="true"/>
</appender>
I am wondering if it is possible to combine inside an appender both timebasedrollingpolicy and MaxFileSize/MaxBackupIndex feature ?
<param name="MaxFileSize" value="5KB"/>
<param name="MaxBackupIndex" value="5"/>