我需要通过API在agoraIO中进行云记录。我已经成功获取了responseId,并且通过此responseId我已经成功开始了can录制并获得了200状态代码的sid。
但是,当我调用stop()函数时,它显示错误代码:435。我有AWS3帐户并输入accessKey和accesSecrete。我也创建了存储桶。我对水桶几乎一无所知。我已经添加了AWS3的访问权限。
是存储桶名称还是其他名称?
我请任何线索或修改。
<UserControl.DataContext>
<local:LoginViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<Storyboard x:Key="name">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="txbcUserName">
<EasingDoubleKeyFrame KeyTime="0" Value="16"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="14"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="11"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="10"/>
</DoubleAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(Block.Padding)" Storyboard.TargetName="txbcUserName">
<EasingThicknessKeyFrame KeyTime="0" Value="17"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.1" Value="14"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.2" Value="11"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.3" Value="8"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.4" Value="0"/>
</ThicknessAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="txbcUserName">
<DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static VerticalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static VerticalAlignment.Top}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="txbcUserName">
<DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static HorizontalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static HorizontalAlignment.Left}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="txtUserName">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="txtUserName">
<EasingThicknessKeyFrame KeyTime="0" Value="0"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.4" Value="3,3,0,0"/>
</ThicknessAnimationUsingKeyFrames>
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="txbcUserName">
<DiscreteBooleanKeyFrame KeyTime="0:0:0.3" Value="True"/>
<DiscreteBooleanKeyFrame KeyTime="0:0:0.4" Value="False"/>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="nameReverse">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="txbcUserName">
<SplineDoubleKeyFrame KeyTime="0" Value="10"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="11"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="14"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.4" Value="16"/>
</DoubleAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(Block.Padding)" Storyboard.TargetName="txbcUserName">
<SplineThicknessKeyFrame KeyTime="0" Value="0"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.1" Value="8"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.2" Value="11"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.3" Value="14"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.4" Value="17"/>
</ThicknessAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="txbcUserName">
<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static VerticalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static VerticalAlignment.Stretch}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="txbcUserName">
<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static HorizontalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static HorizontalAlignment.Stretch}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="txtUserName">
<DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="{x:Static Visibility.Visible}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
</ObjectAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="txtUserName">
<SplineThicknessKeyFrame KeyTime="0:0:0.0" Value="3,3,0,0"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.4" Value="0"/>
</ThicknessAnimationUsingKeyFrames>
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="txbcUserName">
<DiscreteBooleanKeyFrame KeyTime="0:0:0.3" Value="False"/>
<DiscreteBooleanKeyFrame KeyTime="0:0:0.4" Value="True"/>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="password">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="txbcPass">
<EasingDoubleKeyFrame KeyTime="0" Value="16"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="14"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="11"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="10"/>
</DoubleAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(Block.Padding)" Storyboard.TargetName="txbcPass">
<EasingThicknessKeyFrame KeyTime="0" Value="17"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.1" Value="14"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.2" Value="11"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.3" Value="8"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.4" Value="0"/>
</ThicknessAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="txbcPass">
<DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static VerticalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static VerticalAlignment.Top}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="txbcPass">
<DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static HorizontalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static HorizontalAlignment.Left}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="pbPass">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="pbPass">
<EasingThicknessKeyFrame KeyTime="0" Value="0"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.4" Value="3,3,0,0"/>
</ThicknessAnimationUsingKeyFrames>
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="txbcPass">
<DiscreteBooleanKeyFrame KeyTime="0:0:0.3" Value="True"/>
<DiscreteBooleanKeyFrame KeyTime="0:0:0.4" Value="False"/>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="passwordReverse">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontSize)" Storyboard.TargetName="txbcPass">
<SplineDoubleKeyFrame KeyTime="0" Value="10"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="11"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="14"/>
<SplineDoubleKeyFrame KeyTime="0:0:0.4" Value="16"/>
</DoubleAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(Block.Padding)" Storyboard.TargetName="txbcPass">
<SplineThicknessKeyFrame KeyTime="0" Value="0"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.1" Value="8"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.2" Value="11"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.3" Value="14"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.4" Value="17"/>
</ThicknessAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="txbcPass">
<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static VerticalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static VerticalAlignment.Stretch}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="txbcPass">
<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static HorizontalAlignment.Stretch}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static HorizontalAlignment.Stretch}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="pbPass">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Collapsed}"/>
</ObjectAnimationUsingKeyFrames>
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="pbPass">
<SplineThicknessKeyFrame KeyTime="0" Value="3,3,0,0"/>
<SplineThicknessKeyFrame KeyTime="0:0:0.4" Value="0"/>
</ThicknessAnimationUsingKeyFrames>
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="txbcPass">
<DiscreteBooleanKeyFrame KeyTime="0:0:0.3" Value="False"/>
<DiscreteBooleanKeyFrame KeyTime="0:0:0.4" Value="True"/>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot">
<Rectangle RadiusY="10"
RadiusX="10"
Fill="White"/>
<StackPanel Margin="10,10,10,10" >
<Label Content="LOGIN 5"
Margin="5,10,5,20"/>
<Border Height="60"
Width="350"
Margin="5"
Padding="0"
BorderThickness="2,2,2,2"
BorderBrush="Black"
CornerRadius="2,2,2,2">
<DockPanel Grid.Row="1"
Grid.Column="1"
Margin="0" >
<Image DockPanel.Dock="Left"
Source="C:\asd.jpg"
Width="20"
Height="20"/>
<StackPanel Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock x:Name="txbcUserName"
Padding="17"
Text="User Name" FontSize="16"
Foreground="Gray" FontWeight="ExtraLight"
HorizontalAlignment="Stretch"
Background="Transparent"
TextWrapping="Wrap">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<ei:ControlStoryboardAction Storyboard="{StaticResource name}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
<TextBox x:Name="txtUserName"
Text="{Binding Path=User.UserName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Visibility="Collapsed"
FontSize="16"
HorizontalAlignment="Stretch"
Background="Transparent"
BorderBrush="Transparent">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=txtUserName, Path=Visibility}" Value="Visible">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=txtUserName}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBox.Style>
<i:Interaction.Triggers>
<i:EventTrigger EventName="LostFocus">
<ei:ControlStoryboardAction Storyboard="{StaticResource nameReverse}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
</StackPanel>
</DockPanel>
</Border>
<Border Height="60" Width="350" Margin="5" Padding="0" BorderThickness="2,2,2,2" BorderBrush="Black" CornerRadius="2,2,2,2">
<DockPanel Grid.Row="1" Grid.Column="1" Margin="0" >
<Image DockPanel.Dock="Left"
Source="C:\asd.jpg"
Width="20"
Height="20"/>
<StackPanel Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock x:Name="txbcPass"
Text="Password"
Padding="17"
FontSize="16"
Foreground="Gray"
FontWeight="ExtraLight"
HorizontalAlignment="Stretch"
Background="Transparent"
TextWrapping="Wrap">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<ei:ControlStoryboardAction Storyboard="{StaticResource password}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
<PasswordBox x:Name="pbPass"
Visibility="Collapsed"
FontSize="16"
HorizontalAlignment="Stretch"
Background="Transparent"
BorderBrush="Transparent"
pa:PasswordHelper.Attach="True"
pa:PasswordHelper.Password="{Binding Path=User.Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PasswordChar="*">
<PasswordBox.Style>
<Style TargetType="{x:Type PasswordBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=pbPass, Path=Visibility}" Value="Visible">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=pbPass}" />
</DataTrigger>
<!--<DataTrigger Binding="{Binding Ispassfull, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Value="true">
<DataTrigger.ExitActions>
<SkipStoryboardToFill BeginStoryboardName="passwordReverse" />
</DataTrigger.ExitActions>
</DataTrigger>-->
</Style.Triggers>
</Style>
</PasswordBox.Style>
<i:Interaction.Triggers>
<i:EventTrigger EventName="LostFocus">
<ei:ControlStoryboardAction Storyboard="{StaticResource passwordReverse}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</PasswordBox>
</StackPanel>
</DockPanel>
</Border>
</StackPanel>
</Grid>
服务器响应
public function validationDefault(Validator $validator)
{
$validator
->add('content', 'custom', [
'rule' => [$this, 'validateRequiredTokens'],
'message' => 'Some of the required tokens are not present'
]);
return $validator;
}
public function validateRequiredTokens($check, array $context)
{
$missingTokens = [];
if (!empty($missingTokens)) {
// Want to update the validation message here to reflect the missing tokens.
$validationMessage = __('The following tokens are missing {0}', implode(',', $missingTokens));
//Return error message instead of false
return $validationMessage;
}
return true;
}
答案 0 :(得分:0)
您的开始请求的正文应如下所示
{
"cname":"{{AccessChannel}}",
"uid":"{{RecordingUID}}",
"clientRequest":{
"recordingConfig":{
"maxIdleTime":120,
"streamTypes":2,
"audioProfile":1,
"channelType":1,
"videoStreamType":0,
"transcodingConfig":{
"width":360,
"height":640,
"fps":24,
"bitrate":800,
"mixedVideoLayout":1,
"maxResolutionUid":"1"
}
},
"storageConfig":{
"vendor":{{StorageVendor}},
"region":{{StorageRegion}},
"bucket":"{{Bucket}}",
"accessKey":"{{AccessKey}}",
"secretKey":"{{SecretKey}}"
}
}
}
Agora的Postman集合使设置更易于理解:https://documenter.getpostman.com/view/6319646/SVSLr9AM?version=latest
答案 1 :(得分:0)
我开始工作了。
在我的情况下,问题是因为我仅使用API测试记录,而没有使用agora客户端SDK将任何数据从移动/网络传递到agora。这就是为什么什么都没有记录并且状态始终未知的原因。
传递数据后,记录按预期进行。
对于其他调试,您可以编写Agora支持以启用回调事件,这样您就可以看到在agora端发生的所有事件。