refactor the baiduvideo code