I would have one input on the frontend and then validate on the back...
On the frontend:
<input type="file" name="file" accept="image/*,video/*">
On the backend:
public function rules()
{
return [
// ... other validation rules
'file' => 'file'
];
}
You might want to add mimetype validation on the backend too to confirm it's a video/image