Under pressure from the European Commission, ByteDance, owner of the video-sharing app TikTok, has agreed to do more to protect children from hidden advertising and inappropriate content.