我在Ubuntu 14.04上使用WowzaStreamingEngine 4.4.1。我使用了restful api并在示例中创建了vod应用程序(restful_vod),它没有工作没有流式传输vod文件。这就是为什么,我比较默认的vod应用程序和restful_vod应用程序的application.xml文件。 MediaReader属性之间存在差异。默认的vod应用程序没有属性,但restful_vod在下面:
<MediaReader>
<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
<Properties>
<Property>
<Name>randomAccessReaderClass</Name>
<Value></Value>
<Type>String</Type>
</Property>
</Properties>
</MediaReader>
当我删除randomAccessReaderClass命名属性时,它开始工作。我意识到mediaReaderRandomAccessReaderClass参数在restful api端管理它的值。但我无法找到一种方法来防止在使用restful api时添加它。我尝试不设置mediaReaderRandomAccessReaderClass值,并设置mediaReaderRandomAccessReaderClass false,null和空字符串。
有没有办法阻止为此添加它或默认工作值?
感谢。
答案 0 :(得分:1)
您可以通过如下设置来设置默认的mediaReaderRandomAccessReaderClass: “mediaReaderRandomAccessReaderClass”:“”
在生成的Application.xml文件中,MediaReader容器将为空,这表示它将使用默认值:
curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod -d'
{
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod",
"version": "1462342478287",
"name": "testvod",
"appType": "VOD",
"description": "Test VOD via REST.",
"applicationTimeout": 0,
"pingTimeout": 0,
"repeaterQueryString": "",
"clientStreamReadAccess": "*",
"avSyncMethod": "senderreport",
"maxRTCPWaitTime": 12000,
"httpStreamers": [
"cupertinostreaming",
"smoothstreaming",
"sanjosestreaming",
"mpegdashstreaming"
],
"mediaReaderRandomAccessReaderClass": "",
"httpOptimizeFileReads": false,
"mediaReaderBufferSeekIO": false,
"captionLiveIngestType": "",
"vodTimedTextProviders": [
"vodcaptionprovidermp4_3gpp"
],
"securityConfig": {
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/security",
"secureTokenVersion": 0,
"clientStreamWriteAccess": "*",
"publishRequirePassword": true,
"publishPasswordFile": "",
"publishRTMPSecureURL": "",
"publishIPBlackList": "",
"publishIPWhiteList": "",
"publishBlockDuplicateStreamNames": false,
"publishValidEncoders": "",
"publishAuthenticationMethod": "digest",
"playMaximumConnections": 0,
"playRequireSecureConnection": false,
"secureTokenSharedSecret": "",
"secureTokenUseTEAForRTMP": false,
"secureTokenIncludeClientIPInHash": false,
"secureTokenHashAlgorithm": "",
"secureTokenQueryParametersPrefix": "",
"secureTokenOriginSharedSecret": "",
"playIPBlackList": "",
"playIPWhiteList": "",
"playAuthenticationMethod": "none"
},
"streamConfig": {
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/streamconfiguration",
"streamType": "default",
"storageDir": "${com.wowza.wms.context.VHostConfigHome}/content",
"createStorageDir": false,
"storageDirExists": true,
"keyDir": "${com.wowza.wms.context.VHostConfigHome}/keys",
"httpRandomizeMediaName": false
},
"modules": {
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/modules",
"moduleList": [
{
"order": 0,
"name": "base",
"description": "Base",
"class": "com.wowza.wms.module.ModuleCore"
},
{
"order": 1,
"name": "logging",
"description": "Client Logging",
"class": "com.wowza.wms.module.ModuleClientLogging"
},
{
"order": 2,
"name": "flvplayback",
"description": "FLVPlayback",
"class": "com.wowza.wms.module.ModuleFLVPlayback"
},
{
"order": 3,
"name": "ModuleCoreSecurity",
"description": "Core Security Module for Applications",
"class": "com.wowza.wms.security.ModuleCoreSecurity"
}
]
}
}'
例如,用于创建VOD文件的工作REST API命令将如下所示。
- textViewDidChange: