我Error TS2554: Expected 0 arguments, but got 4在 observable 的管道中有一个getHappyDays()
getHappyDays()Observable 返回 a Observable<HttpResponse<IHappyDays>> | Observable<HttpErrorResponse>,我已经包含了一个 stackblitze 来更好地展示问题
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
Observable<IHappyDays> | Observable<never> {
return this.happyService.getHappyDays()
.pipe(//=>error thrown here
first(),
mergeMap((res) => {
return of(res.body)
})
)
}
Run Code Online (Sandbox Code Playgroud)
https://stackblitz.com/edit/angular-3iujhb // 在 happy-resolver.service
极客!
我们都知道名为国际电话输入的真棒插件,有没有办法将它自己的验证方法绑定intlTelInput("isValidNumber")到jquery验证?
intlTelInput("isValidNumber")返回真,如果真或假,如果假
下面还有更多细节!:
var handleContactFormValidation = function () {
var value_form = $('#contact_form');//form i would like to validate where phone field is in!
var value_error = $('.alert-danger', value_form);
var value_success = $('.alert-success', value_form);
value_form.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
rules: { …Run Code Online (Sandbox Code Playgroud) 使用CKeditor角度分量如何设置编辑器高度?
根据文档,可以通过将编辑器样式设置为:
min-height: 500px !important;
Run Code Online (Sandbox Code Playgroud)
但这不起作用!
我只是无法弄清楚 shaka 播放器如何能够解密我的 CENC 保护内容,即使我在播放器配置中提供了无效的解密密钥。
player.configure({
drm: {
clearKeys: {
'6FepeJBbmaiozSMs18vPfA==': '6FepeJBbmaiozSMs18vPfA==', // ==> invalid key
'6FepeJBbmaiozSMs18vPfA==': '6FepeJBbmaiozSMs18vPfA==', // ==> invalid key
}
}
})
Run Code Online (Sandbox Code Playgroud)
这是给打包程序的参数
packager in=video-SD.webm,stream=audio,output=protected_audio.webm,drm_label=AUDIO in=video-HD.
webm,stream=video,output=protected_video_HD.webm,drm_label=HD in=video-SD.webm,stream=video,output=prote
cted_video_SD.webm,drm_label=SD --enable_raw_key_encryption --enable_raw_key_decryption \
--keys label=AUDIO:key_id=f3c5e0361e6654b28f8049c778b23946:key=a4631a153a443df9eed0593043db7519, label=SD:key_id=abba271e8bcf552bbd2e86a434a9a5d9:key=69eaa802a6763af979e8d1940fb88392,label=HD:key_id=abba271e8bcf552bbd2e86a434a9a5d9:key=69eaa802a6763af979e8d1940fb88392 \
--base_urls https://s3-eu-west-1.amazonaws.com/dash/ \
--mpd_output h264.mpd
Run Code Online (Sandbox Code Playgroud)
mpd 文件看起来像
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/google/shaka-packager version 72c4797-release-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT5.539000034332275S">
<BaseURL>https://s3-eu-west-1.amazonaws.com/dash/</BaseURL>
<Period id="0">
<AdaptationSet id="0" contentType="audio" lang="en" subsegmentAlignment="true">
<ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b" cenc:default_KID="f3c5e036-1e66-54b2-8f80-49c778b23946">
<cenc:pssh>AAAAVHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAPzxeA2HmZUso+AScd4sjlGq7onHovPVSu9LoakNKml2au6Jx6Lz1UrvS6GpDSppdkAAAAA</cenc:pssh>
</ContentProtection>
<Representation id="0" bandwidth="96897" …Run Code Online (Sandbox Code Playgroud) 当我通过点击此URL请求特定国家/地区城市时,将获取太多无用的json数据:
http://api.geonames.org/searchJSON?username=ksuhiyp&country=us&maxRows=1000
Run Code Online (Sandbox Code Playgroud)
这会返回太多的json字段,你可以看到,问题很热,查询只能获得城市,国家名称?
angular ×2
api ×1
ckeditor ×1
ckeditor5 ×1
drm ×1
eme ×1
geolocation ×1
geonames ×1
jquery ×1
json ×1
mpeg-dash ×1
shadow-dom ×1
shaka ×1
typescript ×1
web-services ×1
widevine ×1