Skip to content

Instantly share code, notes, and snippets.

View TakuSemba's full-sized avatar

TakuSemba TakuSemba

View GitHub Profile
name value description
playWhenReady Boolean true: start playing after buffering. /\n false: stop playing
playbackState STATE_IDLE STATE_BUFFERING STATE_READY STATE_ENDED STATE_IDLE: nothing to play. STATE_BUFFERING: buffering. STATE_READY: be able to play immediately. STATE_ENDED: finished playing.
Seek Parameters Description
EXACT(default) seek to the closest frame.
CLOSEST_SYNC seek to the closest sync point.
PREVIOUS_SYNC seek to the closest previous sync point.
NEXT_SYNC seek to the closest next sync point.
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version 2453c93f91-release
#EXT-X-TARGETDURATION:12
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="h264_720p.mp4",BYTERANGE="1091@0"
#EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==",KEYID=0x6D76F25CB17F5E16B8EAEF6BBF582D8E,KEYFORMATVERSIONS="1",KEYFORMAT="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
<ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="abba271e-8bcf-552b-bd2e-86a434a9a5d9"/>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
<cenc:pssh>AAAAN3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABciD3Rlc3QgY29udGVudCBpZEjj3JWbBg==</cenc:pssh>
</ContentProtection>
packager \
in=sample.mp4,stream=audio,output=audio.mp4,playlist_name=audio.m3u8,hls_group_id=audio,hls_name=ENGLISH \
in=sample.mp4,stream=video,output=video.mp4,playlist_name=video.m3u8 \
--hls_master_playlist_output master.m3u8 \
--enable_widevine_encryption \
--key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test \
--content_id 7465737420636f6e74656e74206964 \
--signer widevine_test \
--aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 \
--aes_signing_iv d58ce954203b7c9a9a9d467f59839249
packager \
in=sample.mp4,stream=audio,output=audio.mp4 \
in=sample.mp4,stream=video,output=video.mp4 \
--mpd_output sample.mpd \
--enable_widevine_encryption \
--key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test \
--content_id 7465737420636f6e74656e74206964 \
--signer widevine_test \
--aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 \
--aes_signing_iv d58ce954203b7c9a9a9d467f59839249
# Dangerfile
checkstyle_format.base_path = Dir.pwd
checkstyle_format.report 'path/to/result.xml'
@RunWith(JUnitPlatform::class)
class ExpressionFunctionTest : Spek({
describe("one line function rule") {
it("have to specify the return type") {
val rule = ExpressionFunctionRule()
assertThat(rule.lint(
"""
class CustomRuleSetProvider : RuleSetProvider {
override fun get(): RuleSet = RuleSet(
"my-custom-rule",
ExpressionFunctionRule()
)
}
class ExpressionFunctionRule : Rule("one-line-function") {
override fun visit(
node: ASTNode,
autoCorrect: Boolean,
emit: (offset: Int, errorMessage: String, canBeAutoCorrected: Boolean) -> Unit
) {
if (node.elementType == KtStubElementTypes.FUNCTION && !node.text.contains('\n')) {
val child = node.findChildByType(KtNodeTypes.VALUE_PARAMETER_LIST) ?: return
if (child.treeNext.elementType == KtTokens.WHITE_SPACE && child.treeNext.treeNext.elementType == KtTokens.EQ) {