<commit_before>const {app, BrowserWindow, ipcMain} = require('electron')
const path = require('path')
const url = require('url')

const MEDIA_ERR_SRC_NOT_SUPPORTED = 4

let window

app.once('ready', () => {
  window = new BrowserWindow({
    show: false
  })

  window.loadURL(url.format({
    protocol: 'file',
    slashed: true,
    pathname: path.resolve(__dirname, 'asar', 'video.asar', 'index.html')
  }))

  ipcMain.on('asar-video', function (event, message, error) {
    if (message === 'ended') {
      console.log('Video played, proprietary codecs are included')
      app.exit(1)
      return
    }

    if (message === 'error' && error === MEDIA_ERR_SRC_NOT_SUPPORTED) {
      console.log('Video format not supported, proprietary codecs are not included')
      app.exit(0)
      return
    }

    console.log(`Unexpected error: ${error}`)
    app.exit(1)
  })
})
<commit_msg>Add comment to codecs app script<commit_after>// Verifies that Electron cannot play a video that uses proprietary codecs
//
// This application should be run with the ffmpeg that does not include
// proprietary codecs to ensure Electron uses it instead of the version
// that does include proprietary codecs.

const {app, BrowserWindow, ipcMain} = require('electron')
const path = require('path')
const url = require('url')

const MEDIA_ERR_SRC_NOT_SUPPORTED = 4

let window

app.once('ready', () => {
  window = new BrowserWindow({
    show: false
  })

  window.loadURL(url.format({
    protocol: 'file',
    slashed: true,
    pathname: path.resolve(__dirname, 'asar', 'video.asar', 'index.html')
  }))

  ipcMain.on('asar-video', function (event, message, error) {
    if (message === 'ended') {
      console.log('Video played, proprietary codecs are included')
      app.exit(1)
      return
    }

    if (message === 'error' && error === MEDIA_ERR_SRC_NOT_SUPPORTED) {
      console.log('Video format not supported, proprietary codecs are not included')
      app.exit(0)
      return
    }

    console.log(`Unexpected error: ${error}`)
    app.exit(1)
  })
})

{'fraction_non_alphanumeric': 0.13757899854156538, 'fraction_numerical': 0.003889158969372873, 'mean_word_length': 3.493449781659389, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5986582', 'n_tokens_mistral': 667, 'n_tokens_neox': 635, 'n_words': 182}